diff --git a/.github/workflows/alz-pattern-update-policies.yml b/.github/workflows/alz-pattern-update-policies.yml
new file mode 100644
index 000000000..b48aa3ba7
--- /dev/null
+++ b/.github/workflows/alz-pattern-update-policies.yml
@@ -0,0 +1,151 @@
+---
+name: Update Policy Deployment Templates
+
+##########################################
+# Start the job on push for all branches #
+##########################################
+
+# yamllint disable-line rule:truthy
+on:
+ pull_request_target:
+ types:
+ - opened
+ - reopened
+ - synchronize
+ - ready_for_review
+ paths:
+ - "services/**.json"
+ - "patterns/alz/**.json"
+ - "patterns/alz/templates/**.bicep"
+
+env:
+ github_user_name: "github-actions"
+ github_email: "41898282+github-actions[bot]@users.noreply.github.com"
+ github_commit_message: "Auto-update Policies"
+ github_pr_number: ${{ github.event.number }}
+ github_pr_repo: ${{ github.event.pull_request.head.repo.full_name }}
+
+permissions:
+ contents: write
+
+###############
+# Set the Job #
+###############
+
+jobs:
+ update-portal:
+ name: Update Policy Deployment Templates
+ runs-on: ubuntu-latest
+ if: |
+ (
+ github.event.pull_request.head.repo.full_name == 'arjenhuitema/azure-monitor-baseline-alerts'
+ )
+ ||
+ (
+ github.event.pull_request.head.repo.full_name != 'arjenhuitema/azure-monitor-baseline-alerts'
+ &&
+ contains(github.event.pull_request.labels.*.name, 'PR: Safe to test :test_tube:')
+ )
+ ||
+ (
+ github.event_name == 'workflow_dispatch'
+ )
+ ||
+ (
+ github.event_name == 'merge_group'
+ )
+
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v3
+
+ - name: Show env
+ run: env | sort
+
+ - name: Check out PR
+ run: |
+ echo "==> Check out PR..."
+ gh pr checkout "$github_pr_number"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Configure local git
+ run: |
+ echo "git user name : $github_user_name"
+ git config --global user.name "$github_user_name"
+ echo "git user email : $github_email"
+ git config --global user.email "$github_email"
+
+ - name: Update Automation policies
+ run: bicep build ./patterns/alz/templates/policies-Automation.bicep --outfile ./patterns/alz/policyDefinitions/policies-Automation.json
+
+ - name: Update Compute policies
+ run: bicep build ./patterns/alz/templates/policies-Compute.bicep --outfile ./patterns/alz/policyDefinitions/policies-Compute.json
+
+ - name: Update Hybrid policies
+ run: bicep build ./patterns/alz/templates/policies-Hybrid.bicep --outfile ./patterns/alz/policyDefinitions/policies-Hybrid.json
+
+ - name: Update Key Management policies
+ run: bicep build ./patterns/alz/templates/policies-KeyManagement.bicep --outfile ./patterns/alz/policyDefinitions/policies-KeyManagement.json
+
+ - name: Update Monitoring policies
+ run: bicep build ./patterns/alz/templates/policies-Monitoring.bicep --outfile ./patterns/alz/policyDefinitions/policies-Monitoring.json
+
+ - name: Update Network policies
+ run: bicep build ./patterns/alz/templates/policies-Network.bicep --outfile ./patterns/alz/policyDefinitions/policies-Network.json
+
+ - name: Update Notification Assets policies
+ run: bicep build ./patterns/alz/templates/policies-NotificationAssets.bicep --outfile ./patterns/alz/policyDefinitions/policies-NotificationAssets.json
+
+ - name: Update Recovery Services policies
+ run: bicep build ./patterns/alz/templates/policies-RecoveryServices.bicep --outfile ./patterns/alz/policyDefinitions/policies-RecoveryServices.json
+
+ - name: Update Resource Management policies
+ run: bicep build ./patterns/alz/templates/policies-ServiceHealth.bicep --outfile ./patterns/alz/policyDefinitions/policies-ServiceHealth.json
+
+ - name: Update Security policies
+ run: bicep build ./patterns/alz/templates/policies-Storage.bicep --outfile ./patterns/alz/policyDefinitions/policies-Storage.json
+
+ - name: Update Web policies
+ run: bicep build ./patterns/alz/templates/policies-Web.bicep --outfile ./patterns/alz/policyDefinitions/policies-Web.json
+
+ - name: Update policy set definitions
+ run: bicep build ./patterns/alz/templates/policySets.bicep --outfile ./patterns/alz/policyDefinitions/policySets.json
+
+ - name: Check git status
+ run: |
+ echo "==> Check git status..."
+ git status --short --branch
+
+ - name: Stage changes
+ run: |
+ echo "==> Stage changes..."
+ mapfile -t STATUS_LOG < <(git status --short | grep patterns/alz)
+ if [ ${#STATUS_LOG[@]} -gt 0 ]; then
+ echo "Found changes to the following files:"
+ printf "%s\n" "${STATUS_LOG[@]}"
+ git add --all ./patterns/alz
+ else
+ echo "No changes to add."
+ fi
+
+ - name: Push changes
+ run: |
+ echo "==> Check git diff..."
+ mapfile -t GIT_DIFF < <(git diff --cached)
+ printf "%s\n" "${GIT_DIFF[@]}"
+
+ if [ ${#GIT_DIFF[@]} -gt 0 ]; then
+
+ echo "==> Commit changes..."
+ git commit --message "$github_commit_message [$GITHUB_ACTOR/${GITHUB_SHA::8}]"
+
+ echo "==> Push changes..."
+ echo "Pushing changes to: $github_pr_repo"
+ git push "https://$GITHUB_TOKEN@github.com/$github_pr_repo.git" "HEAD:$GITHUB_HEAD_REF"
+
+ else
+ echo "No changes found."
+ fi
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/generate-templates.yml b/.github/workflows/generate-templates.yml
new file mode 100644
index 000000000..cc79a04e9
--- /dev/null
+++ b/.github/workflows/generate-templates.yml
@@ -0,0 +1,88 @@
+# Workflow for generating (arm/bicep/etc) templates for each alert
+name: Generate Templates
+
+on:
+ # Runs on pushes targeting the default branch
+ push:
+ branches:
+ - main
+ paths:
+ - 'services/**/alerts.yaml'
+ - 'tooling/generate-templates/**'
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch: {}
+
+permissions:
+ contents: write
+ pull-requests: write
+
+jobs:
+ generate-templates:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ ref: main
+ submodules: recursive
+ fetch-depth: 0
+
+ - name: Setup Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.12' # install the python version needed
+
+ - name: Install Python Packages and Requirements
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements.txt
+ working-directory: tooling/generate-templates
+
+ - name: Generate Templates
+ id: generate
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
+ git config --local user.name "github-actions[bot]"
+
+ git checkout -b github-action-generate-templates
+
+ # Generate templates for alerts
+ echo "Generating templates for alerts..."
+ python tooling/generate-templates/generate-templates.py --path services --output services --template_path tooling/generate-templates/templates
+
+ # Check if there are any changes in the services directory
+ git add services
+
+ # Check if there are any changes to commit
+ if [[ `git status --porcelain` ]]; then
+ git commit -m "[GitHub Action - Generate Templates] Generate templates for alerts"
+
+ # Push changes to the current branch
+ git push --set-upstream origin github-action-generate-templates --force
+
+ prs=$(gh pr list \
+ --repo "$GITHUB_REPOSITORY" \
+ --head 'github-action-generate-templates' \
+ --base 'main' \
+ --json title \
+ --jq 'length')
+
+ if ((prs > 0)); then
+ echo "skippr=true" >> "$GITHUB_OUTPUT"
+ fi
+ else
+ echo "skippr=true" >> "$GITHUB_OUTPUT"
+ fi
+ # Diasble PR creation for now since it is not supported in the Azure repo
+ # - name: Create pull request
+ # if: '!steps.generate.outputs.skippr'
+ # env:
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # run: |
+ # # Create a pull request
+ # echo "Creating a pull request..."
+ # gh pr --repo ${{ github.repository }} create --title "[GitHub Action - Generate Templates] Generate templates for alerts" --body "This PR was automatically generated by the workflow." --base main --head github-action-generate-templates
+
diff --git a/.github/workflows/hugo-build-pr-check.yml b/.github/workflows/hugo-build-pr-check.yml
index 847761cfd..4c659dc4a 100644
--- a/.github/workflows/hugo-build-pr-check.yml
+++ b/.github/workflows/hugo-build-pr-check.yml
@@ -7,6 +7,11 @@ on:
- main
paths:
- 'docs/**'
+ - 'services/**/alerts.yaml'
+ - 'services/**/*.md'
+ - 'services/**/templates/**'
+ - 'tooling/export-alerts/**'
+ - 'tooling/generate-templates/**'
- '.github/workflows/hugo-build-pr-check.yml'
workflow_dispatch: {}
diff --git a/.github/workflows/hugo-site-build.yml b/.github/workflows/hugo-site-build.yml
index a46eb5120..40335b5b3 100644
--- a/.github/workflows/hugo-site-build.yml
+++ b/.github/workflows/hugo-site-build.yml
@@ -10,6 +10,7 @@ on:
- 'docs/**'
- 'services/**/alerts.yaml'
- 'services/**/*.md'
+ - 'services/**/templates/**'
- 'tooling/export-alerts/**'
- 'tooling/generate-templates/**'
@@ -69,12 +70,6 @@ jobs:
python export-alerts.py --path ../../services --template ./alerts-template.xlsx --output-xls ../../services/amba-alerts.xlsx --output-json ../../services/amba-alerts.json --output-yaml ../../services/amba-alerts.yaml
working-directory: tooling/export-alerts
- - name: Generate Templates
- run: |
- pip install -r requirements.txt
- python generate-templates.py --path ../../services --output ../../artifacts/templates
- working-directory: tooling/generate-templates
-
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
diff --git a/docs/content/patterns/alz/Bring-your-own-Managed-Identity.md b/docs/content/patterns/alz/Bring-your-own-Managed-Identity.md
index 4709169cb..0f491931b 100644
--- a/docs/content/patterns/alz/Bring-your-own-Managed-Identity.md
+++ b/docs/content/patterns/alz/Bring-your-own-Managed-Identity.md
@@ -58,16 +58,13 @@ This new feature is used in Log-search based alerts. At the moment of this relea
We're planning to use this feature more in the future and to include it as part of other alerts.
{{< /hint >}}
-
diff --git a/docs/content/patterns/alz/Known-Issues.md b/docs/content/patterns/alz/Known-Issues.md
index 4b8dfb6ff..11d846739 100644
--- a/docs/content/patterns/alz/Known-Issues.md
+++ b/docs/content/patterns/alz/Known-Issues.md
@@ -8,11 +8,15 @@ weight: 100
### Error includes
-*failed to resolve table or column expression named*
+The error can be presented with one of the two following messages:
+
+- *failed to resolve table or column expression named*
+
+- *{"code": "BadRequest", "message": "{\r\n "error": {\r\n "code": "DraftClientException",\r\n "message": "The request had some invalid properties Activity D: 3332f9c0-b4d4-464b-8ec4-44a670ba745b."\r\n }\r\n}"}*
### Cause
-The underlying data is not present in the Log Analytics table.
+The underlying data isn't present in the Log Analytics table or there's no virtual machine associated to any VM Insights data collection rule.
### Resolution
@@ -26,7 +30,7 @@ Deployment of AMBA fails when there are orphaned role assignments.
*"error": {
"code": "RoleAssignmentUpdateNotPermitted",
- "message": "Tenant ID, application ID, principal ID, and scope are not allowed to be updated."
+ "message": "Tenant ID, application ID, principal ID, and scope aren't allowed to be updated."
}*
### Cause
@@ -48,12 +52,12 @@ When a role or a role assignment is removed, some orphaned object can still appe
### Cause
-A deployment has been performed using one region, for example "uksouth", and when you try to deploy again to the same scope but to a different region you will receive an error. This happens even when a cleanup has been performed (see [Cleaning up a Deployment](../Cleaning-up-a-Deployment) for more details). This is because deployment entries still exist from the previous operation, so a region conflict is detected blocking you to run another deployment using a different region.
+A deployment has been performed using one region, for example "uksouth", and when you try to deploy again to the same scope but to a different region you'll receive an error. This happens even when a cleanup has been performed (see [Cleaning up a Deployment](../Cleaning-up-a-Deployment) for more details). This is because deployment entries still exist from the previous operation, so a region conflict is detected blocking you to run another deployment using a different region.
### Resolution
-Situation 1: You are trying to deploy to a region different from the one used in previous deployment. Deploying to the same scope in a different region is not necessary. The definitions and assignments are scoped to a management group and are not region-specific. No action is required.
+Situation 1: You're trying to deploy to a region different from the one used in previous deployment. Deploying to the same scope in a different region isn't necessary. The definitions and assignments are scoped to a management group and aren't region-specific. No action is required.
-Situation 2: You cleaned up a previous implementation and want to deploy again to a different region. To resolve this issue, follow the steps below:
+Situation 2: You cleaned up a previous implementation and want to deploy again to a different region. To resolve this issue, follow the following steps:
1. Navigate to ***Management Groups***
2. Select the management group (corresponding to the value entered for the *enterpriseScaleCompanyPrefix* during the deployment) were AMBA deployment was targeted to
@@ -83,7 +87,7 @@ If you deployed AMBA just one time, you have 14 deployment instances
The limit of 800 deployment for the given management group scope has been reached. More information can be found at [Management group limits](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#management-group-limits)
### Resolution
-To resolve this issue, follow the steps below:
+To resolve this issue, follow the following steps:
1. Navigate to ***Management Groups***
2. Select the management group (corresponding to the value entered for the *enterpriseScaleCompanyPrefix* during the deployment) were AMBA deployment was targeted to
@@ -101,3 +105,23 @@ To recognize the deployment names belonging to AMBA, select those deployments wh
If you deployed AMBA just one time, you have 14 deployment instances
{{< /hint >}}
+
+## Failed to deploy because of 'location' property not specified
+
+### Error includes
+
+The error can be presented with one of the two following messages:
+
+- *{"code": "InvalidDeployment", "message": "The 'location' property must be specified for 'amba-id-amba-prod-001'. Please see https://aka.ms/arm-deployment-subscription for usage details."}*
+
+- *InvalidDeployment - Long running operation failed with status 'Failed'. Additional Info:'The 'location' property must be specified for 'amba-id-amba-prod-001'. Please see https://aka.ms/arm-deployment-subscription for usage details.'*
+
+### Cause
+
+The new [Bring Your Own User Assigned Managed Identity (BYO UAMI)](../Bring-your-own-Managed-Identity) allows you to either use an existing User Assigned Managed Identity (UAMI) or to create a new one in the management subscription automatically assigning the Monitoring reader role to it at the parent pseudo root Management Group. If you opted for creating a new UAMI, the management subscription id is needed.
+
+### Resolution
+
+Set the parameter for the management subscription id correctly in the parameter file:
+
+![New UAMI deployed by the template](../media/alz-UAMI-Param-Example-2.png)
diff --git a/docs/content/patterns/networking/UseCases/_index.md b/docs/content/patterns/networking/UseCases/_index.md
new file mode 100644
index 000000000..1df03fa41
--- /dev/null
+++ b/docs/content/patterns/networking/UseCases/_index.md
@@ -0,0 +1,71 @@
+---
+title: Azure application delivery network monitoring
+geekdocCollapseSection: true
+---
+
+## Overview
+
+Azure network is a complex and dynamic system that connects your cloud resources and applications. It is crucial to monitor your Azure network to ensure its availability, reliability, security, and efficiency. Monitoring your Azure network can help you troubleshoot issues, optimize performance, identify bottlenecks, and plan for future growth.
+Before embarking on designing and deploying Azure Network Monitoring, It`s important to familiarize yourself with the necessary Azure services and tools. These include:
+
+- Azure Monitor: This service provides comprehensive solutions for collecting, analyzing, and acting on telemetry from your cloud and on-premises environments. Additionally, this service provides an integrated management environment that includes Metrics, Insights, and Log Analytics workspaces.
+- Azure Log Analytics workspace: Part of Azure monitor, it collects and analyzes data generated by resources in your cloud and on-premises environments.
+- Azure Network watcher: Offers network performance monitoring, diagnostic tools, and insights into your network in both Azure and on-premises.
+- Azure Automation or Logic Apps: Helps in automating repetitive tasks that are critical for network monitoring and management.
+- Azure security center (Optional): For security management and threat protection.
+
+There are a number of use cases which would requires network monitoring but the following use cases major requirements.
+
+ **Performance monitoring:** Increasing the performance or optimizing the performance of application network means adjusting levers such as response time optimization, increasing throughput, enhancing network efficiency, minimizing packet loss and ensuring availability of network for mission critical application.
+
+**Response time Monitoring:** Response time optimization aims to reduce bottlenecks between Virtual machines and appliances. Response time optimization also reduces latency through location-based traffic analysis.
+
+**Throughput Monitoring:** Throughput significantly affects performance when the right services are not configured for the right amount of data transfer. Features such as accelerated networking in Azure increase.
+
+**Monitoring packet losses:** Packet loss is the loss or drop of network packets during transmission, which affects performance, latency, and reliability. Packet loss can have various causes, such as congestion, hardware, settings, or attacks. Isolating the networks into their own segments, applying security and reliability best practices would eliminate the causation of packet losses and increases performance of Azure network. Virtual Network can help prevent packet loss by enabling features such as network security groups, user-defined routes, virtual network peering, and service endpoints
+
+**Availability monitoring**: Availability is the measure of how reliably a service or resource is accessible and functional. Availability can be affected by factors such as network failures, configuration errors, or planned maintenance. To monitor the availability of your Azure network, you can use features such as:
+
+- Service level agreements (SLAs): SLAs are contractual commitments that define the expected performance and availability of a service or resource. Azure provides SLAs for various network services, such as Virtual Network, ExpressRoute, VPN Gateway, and Load Balancer. You can compare the actual performance and availability of your network with the SLA targets and report any discrepancies or issues to Azure support.
+- Azure Service Health: Azure Service Health is a dashboard that provides you with the current and historical status of your Azure services and regions. It also notifies you of any planned maintenance or service issues that may affect your network. You can use Azure Service Health to monitor the health and availability of your network services and resources across Azure regions.
+- Network Performance Monitor (NPM): NPM is a service that helps you monitor and diagnose network performance issues between your Azure resources and on-premises locations. It provides you with metrics such as network latency, packet loss, topology, and routing. You can use NPM to monitor the availability and performance of your network connections, such as ExpressRoute, VPN, or hybrid cloud scenarios.
+
+## Network Monitoring tools
+
+### Azure Monitor
+
+Azure Monitor is a comprehensive service that collects, analyzes, and visualizes data from your Azure resources and applications. It provides you with metrics, logs, alerts, dashboards, and insights that can help you monitor the health and performance of your Azure network.
+Some of the advantages of using Azure Monitor are:
+
+- It supports various types of data sources, such as azure resources, guest operating systems, custom applications, and external services.
+- It integrates with other Azure services, such as Azure Security Center, Azure Sentinel, Azure Advisor, and Azure Service Health.
+- It allows you to create custom queries, alerts, dashboards, and reports using Azure Data Explorer, Azure Log Analytics, and Azure Application Insights.
+- It enables you to automate actions and workflows using Azure Logic Apps, Azure Functions, and Azure Automation.
+
+To use Azure Monitor, you need to enable the diagnostic settings for your Azure network resources, such as virtual networks, network security groups, load balancers, application gateways, and azure front door.
+You can configure the diagnostic settings to send the data to a storage account, an event hub, or a log analytics workspace. You can also use the Azure Monitor agent to collect additional data from your virtual machines and containers.
+
+
+### Network Watcher
+
+Network Watcher is a service that provides network monitoring and diagnostic capabilities for your Azure network. It helps you to troubleshoot network connectivity issues, analyze network traffic, and verify network security.
+Some of the features of Network Watcher are:
+
+- Connection monitor: It allows you to monitor the connectivity and latency between your Azure resources, such as virtual machines, virtual networks, and application gateways. You can create tests to check the availability and performance of your network endpoints and receive alerts when there are failures or degradation.
+- Network performance monitor: It allows you to monitor the network performance and reliability of your hybrid and multi-cloud environments. You can create network performance groups to define the source and destination endpoints and monitor the network metrics, such as loss, latency, and jitter. You can also view the network topology and hop-by-hop route details.
+- Traffic analytics: It allows you to analyze the network traffic and flow data from your Azure network resources. You can use traffic analytics to identify the traffic patterns, trends, and anomalies, as well as the sources, destinations, and protocols of your network traffic. You can also use traffic analytics to optimize your network bandwidth, security, and configuration.
+- IP flow verify: It allows you to verify the IP flow from a virtual machine to a destination IP address and port. You can use IP flow verify to check if the network security group rules are allowing or denying the traffic, as well as the direction and state of the traffic.
+- Next hop: It allows you to determine the next hop for packets from a virtual machine to a destination IP address. You can use the next hop to troubleshoot routing issues and verify the routing configuration.
+- Packet capture: It allows you to capture packets from a virtual machine and store them in a storage account or file. You can use packet capture to analyze the network traffic and diagnose network issues.
+- NSG flow logs: It allows you to record the network security group rules that are applied to the network interfaces and subnets. You can use NSG flow logs to audit the network security and compliance, as well as to troubleshoot network connectivity and performance issues.
+To use Network Watcher, you need to enable the service for your Azure regions and register your network resources. You can access Network Watcher from the Azure portal, Azure CLI, Azure PowerShell, or REST API.
+
+### Other Tools and Features
+
+Besides Azure Monitor and Network Watcher, there are other tools and features that you can use to monitor your Azure network, such as:
+
+- Azure Service Health: It provides you with the status and updates of your Azure services and regions. You can use Azure Service Health to check the health of your Azure network and receive notifications and guidance when there are service issues or planned maintenance.
+- Azure Network Insights: It provides you with the network topology and dependencies of your Azure resources. You can use Azure Network Insights to visualize and explore your network configuration and connectivity, as well as to identify and resolve network issues.
+- Azure Network Security Group Analytics: It provides you with the network security group rules and traffic analysis of your Azure network. You can use Azure Network Security Group Analytics to optimize your network security and performance, as well as to detect and prevent network threats.
+- Azure Advisor: It provides you with the best practices and recommendations to optimize your Azure resources and services. You can use Azure Advisor to improve your network security, performance, reliability, and cost.
+These tools and features are available from the Azure portal, Azure CLI, Azure PowerShell, or REST API.
diff --git a/docs/content/patterns/networking/_index.md b/docs/content/patterns/networking/_index.md
new file mode 100644
index 000000000..3a1826743
--- /dev/null
+++ b/docs/content/patterns/networking/_index.md
@@ -0,0 +1,4 @@
+---
+title: Networking
+geekdocCollapseSection: true
+---
diff --git a/docs/layouts/partials/templates/template-tabs.html b/docs/layouts/partials/templates/template-tabs.html
index 61b59b461..33acd7d25 100644
--- a/docs/layouts/partials/templates/template-tabs.html
+++ b/docs/layouts/partials/templates/template-tabs.html
@@ -1,8 +1,9 @@
{{ $category := .category }}
{{ $type := .type }}
-{{ $filename := printf "%s.json" .alert.guid | printf "%s"}}
-{{ $version := readFile "artifacts/templates/latest_version.txt" }}
-{{ $file := path.Join "artifacts/templates" $version $category $type $filename }}
+{{ $alert_name := .alert.name | replaceRE `[^a-zA-Z0-9-]` "" }}
+{{ $alert_name := printf "%s_%s" $alert_name .alert.guid }}
+{{ $filename := printf "%s.json" $alert_name | printf "%s"}}
+{{ $file := path.Join "services" $category $type "templates/arm" $filename }}
- {{ $filename := printf "%s.bicep" .alert.guid | printf "%s"}}
- {{ $file := path.Join "artifacts/templates" $version $category $type $filename }}
+ {{ $filename := printf "%s.bicep" $alert_name | printf "%s"}}
+ {{ $file := path.Join "services" $category $type "templates/bicep" $filename }}
{{ $data := readFile $file }}
{{ highlight $data "bicep" }}
diff --git a/patterns/alz/alzArm.param.json b/patterns/alz/alzArm.param.json
index 03c160217..99db8f93e 100644
--- a/patterns/alz/alzArm.param.json
+++ b/patterns/alz/alzArm.param.json
@@ -1786,6 +1786,9 @@
"AGWApplicationGatewayTotalTimeAlertSeverity": {
"value": "2"
},
+ "AGWApplicationGatewayTotalTimeAlertSensitivity": {
+ "value": "Medium"
+ },
"AGWApplicationGatewayTotalTimeWindowSize": {
"value": "PT5M"
},
@@ -1801,6 +1804,9 @@
"AGWBackendLastByteResponseTimeAlertSeverity": {
"value": "2"
},
+ "AGWBackendLastByteResponseTimeAlertSensitivity": {
+ "value": "Medium"
+ },
"AGWBackendLastByteResponseTimeWindowSize": {
"value": "PT5M"
},
@@ -1861,6 +1867,9 @@
"AGWFailedRequestsAlertSeverity": {
"value": "2"
},
+ "AGWFailedRequestsAlertSensitivity": {
+ "value": "Medium"
+ },
"AGWFailedRequestsWindowSize": {
"value": "PT5M"
},
@@ -1876,6 +1885,9 @@
"AGWResponseStatusAlertSeverity": {
"value": "2"
},
+ "AGWResponseStatusAlertSensitivity": {
+ "value": "Medium"
+ },
"AGWResponseStatusWindowSize": {
"value": "PT5M"
},
diff --git a/patterns/alz/policyDefinitions/policies-Automation.json b/patterns/alz/policyDefinitions/policies-Automation.json
index afd5c601a..0b4fe6a84 100644
--- a/patterns/alz/policyDefinitions/policies-Automation.json
+++ b/patterns/alz/policyDefinitions/policies-Automation.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "15870391291404107047"
+ "version": "0.28.1.47646",
+ "templateHash": "3255589294163330051"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,7 +115,7 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AA_TotalJob_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Automation Account TotalJob Alert\",\r\n \"description\": \"Policy to audit/deploy Automation Account TotalJob Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Automation\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"0\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Automation/automationAccounts\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Automation/automationAccounts\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TotalJob\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Automation/automationAccounts/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TotalJob')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Automation Account TotalJob Alert\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"TotalJob\",\r\n \"metricNamespace\": \"Microsoft.Automation/automationAccounts\",\r\n \"metricName\": \"TotalJob\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Status\",\r\n \"operator\": \"Exclude\",\r\n \"values\": [\r\n \"Completed\"\r\n ]\r\n }\r\n ],\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AA_TotalJob_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Automation Account TotalJob Alert\",\n \"description\": \"Policy to audit/deploy Automation Account TotalJob Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Automation\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"0\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Automation/automationAccounts\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Automation/automationAccounts\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TotalJob\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Automation/automationAccounts/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TotalJob')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Automation Account TotalJob Alert\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"TotalJob\",\n \"metricNamespace\": \"Microsoft.Automation/automationAccounts\",\n \"metricName\": \"TotalJob\",\n \"dimensions\": [\n {\n \"name\": \"Status\",\n \"operator\": \"Exclude\",\n \"values\": [\n \"Completed\"\n ]\n }\n ],\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"cloudEnv": "[environment().name]",
"defaultDeploymentLocationByCloudType": {
"AzureCloud": "northeurope",
diff --git a/patterns/alz/policyDefinitions/policies-Compute.json b/patterns/alz/policyDefinitions/policies-Compute.json
index 0854cd34b..18fe76c06 100644
--- a/patterns/alz/policyDefinitions/policies-Compute.json
+++ b/patterns/alz/policyDefinitions/policies-Compute.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "15452782916874487931"
+ "version": "0.28.1.47646",
+ "templateHash": "14339447373457311972"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,9 +115,9 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_dataDiskReadLatency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM Data Disk Read Latency Alert\",\r\n \"description\": \"Policy to audit/deploy VM dataDiskReadLatency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"25\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMHighDataDiskReadLatencyAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"VMdataDiskReadLatencyAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMHighDataDiskReadLatencyAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighDataDiskReadLatencyAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine dataDiskReadLatency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#1": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_dataDiskSpace_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM Data Disk Space Alert\",\r\n \"description\": \"Policy to audit/deploy VM data Disk Space Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"LessThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMLowDataDiskSpaceAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes)| where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"VMdataDiskSpaceAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMLowDataDiskSpaceAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMLowDataDiskSpaceAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine dataDiskSpace\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes)| where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#10": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_Memory_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM Memory Alert\",\r\n \"description\": \"Policy to audit/deploy VM Memory Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"LessThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMLowMemoryAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Memory\\\" and Name == \\\"AvailableMB\\\" | extend TotalMemory = toreal(todynamic(Tags)[\\\"vm.azm.ms/memorySizeMB\\\"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0 | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"VMMemoryAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMLowMemoryAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMLowMemoryAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine Memory\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Memory\\\" and Name == \\\"AvailableMB\\\" | extend TotalMemory = toreal(todynamic(Tags)[\\\"vm.azm.ms/memorySizeMB\\\"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0 | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_dataDiskReadLatency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM Data Disk Read Latency Alert\",\n \"description\": \"Policy to audit/deploy VM dataDiskReadLatency Alert\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"25\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMHighDataDiskReadLatencyAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"VMdataDiskReadLatencyAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMHighDataDiskReadLatencyAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighDataDiskReadLatencyAlert')]\",\n \"description\": \"Log Alert for Virtual Machine dataDiskReadLatency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#1": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_dataDiskSpace_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM Data Disk Space Alert\",\n \"description\": \"Policy to audit/deploy VM data Disk Space Alert\",\n \"metadata\": {\n \"version\": \"1.5.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"LessThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMLowDataDiskSpaceAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes)| where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"VMdataDiskSpaceAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMLowDataDiskSpaceAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMLowDataDiskSpaceAlert')]\",\n \"description\": \"Log Alert for Virtual Machine dataDiskSpace\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes)| where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#10": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_Memory_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM Memory Alert\",\n \"description\": \"Policy to audit/deploy VM Memory Alert\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"LessThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMLowMemoryAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Memory\\\" and Name == \\\"AvailableMB\\\" | extend TotalMemory = toreal(todynamic(Tags)[\\\"vm.azm.ms/memorySizeMB\\\"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0 | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"VMMemoryAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMLowMemoryAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMLowMemoryAlert')]\",\n \"description\": \"Log Alert for Virtual Machine Memory\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Memory\\\" and Name == \\\"AvailableMB\\\" | extend TotalMemory = toreal(todynamic(Tags)[\\\"vm.azm.ms/memorySizeMB\\\"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0 | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"$fxv#11": {
"type": "Microsoft.Authorization/policySetDefinitions",
"apiVersion": "2021-06-01",
@@ -2508,14 +2508,14 @@
"policyDefinitionGroups": null
}
},
- "$fxv#2": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_dataDiskWriteLatency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM Data Disk Write Latency Alert\",\r\n \"description\": \"Policy to audit/deploy VM dataDiskWriteLatency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"25\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMHighDataDiskWriteLatencyAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"VMdataDiskWriteLatencyAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMHighDataDiskWriteLatencyAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighDataDiskWriteLatencyAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine dataDiskWriteLatency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#3": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_HeartBeat_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM HeartBeat Alert\",\r\n \"description\": \"Policy to audit/deploy VM HeartBeat Alert for all VMs in the subscription\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMHeartBeatAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); Heartbeat | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | summarize TimeGenerated=max(TimeGenerated) by Computer, _ResourceId | extend Duration = datetime_diff(\\\"minute\\\",now(),TimeGenerated) | summarize AggregatedValue = min(Duration) by Computer, bin(TimeGenerated,5m), _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HeartBeatAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMHeartBeatAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMHeartBeatAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine Heartbeat\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); Heartbeat | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | summarize TimeGenerated=max(TimeGenerated) by Computer, _ResourceId | extend Duration = datetime_diff(\\\"minute\\\",now(),TimeGenerated) | summarize AggregatedValue = min(Duration) by Computer, bin(TimeGenerated,5m), _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#4": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_NetworkIn_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM Network Read Alert\",\r\n \"description\": \"Policy to audit/deploy VM Network Read Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10000000\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMHighNetworkInAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"ReadBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"VMNetworkInAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMHighNetworkInAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighNetworkInAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine NetworkIn\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"ReadBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"NetworkInterface\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#5": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_NetworkOut_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM Network Write Alert\",\r\n \"description\": \"Policy to audit/deploy VM Network Out Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10000000\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMHighNetworkOutAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"WriteBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"VMNetworkOutAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMHighNetworkOutAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighNetworkOutAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine NetworkOut\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"WriteBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"NetworkInterface\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#6": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_OSDiskreadLatency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM OS Disk Read Latency Alert\",\r\n \"description\": \"Policy to audit/deploy VM OSDiskreadLatency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"25\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Disks to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMHighOSDiskReadLatencyAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"VMOSDiskreadLatencyAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMHighOSDiskReadLatencyAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighOSDiskReadLatencyAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine OSDiskreadLatency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#7": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_OSDiskSpace_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM OS Disk Space Alert\",\r\n \"description\": \"Policy to audit/deploy VM OSDiskSpace Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"LessThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Disks to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMLowOSDiskSpaceAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"VMOSDiskSpaceAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMLowOSDiskSpaceAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMLowOSDiskSpaceAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine OSDiskSpace\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#8": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_OSDiskwriteLatency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM OS Disk Write Latency Alert\",\r\n \"description\": \"Policy to audit/deploy VM OSDiskwriteLatency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"25\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Disks to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMHighOSDiskWriteLatencyAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"VMOSDiskwriteLatencyAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMHighOSDiskWriteLatencyAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighOSDiskWriteLatencyAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine OSDiskwriteLatency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#9": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VM_CPU_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VM CPU Alert\",\r\n \"description\": \"Policy to audit/deploy VM CPU Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.4.0\",\r\n \"category\": \"Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"85\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Compute/virtualMachines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-VMHighCPUAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"1\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Processor\\\" and Name == \\\"UtilizationPercentage\\\" | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"VMCPUAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-VMHighCPUAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighCPUAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine CPU\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.Compute/virtualMachines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Processor\\\" and Name == \\\"UtilizationPercentage\\\" | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"1\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#2": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_dataDiskWriteLatency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM Data Disk Write Latency Alert\",\n \"description\": \"Policy to audit/deploy VM dataDiskWriteLatency Alert\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"25\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMHighDataDiskWriteLatencyAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"VMdataDiskWriteLatencyAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMHighDataDiskWriteLatencyAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighDataDiskWriteLatencyAlert')]\",\n \"description\": \"Log Alert for Virtual Machine dataDiskWriteLatency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#3": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_HeartBeat_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM HeartBeat Alert\",\n \"description\": \"Policy to audit/deploy VM HeartBeat Alert for all VMs in the subscription\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMHeartBeatAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); Heartbeat | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | summarize TimeGenerated=max(TimeGenerated) by Computer, _ResourceId | extend Duration = datetime_diff(\\\"minute\\\",now(),TimeGenerated) | summarize AggregatedValue = min(Duration) by Computer, bin(TimeGenerated,5m), _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HeartBeatAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMHeartBeatAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMHeartBeatAlert')]\",\n \"description\": \"Log Alert for Virtual Machine Heartbeat\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); Heartbeat | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | summarize TimeGenerated=max(TimeGenerated) by Computer, _ResourceId | extend Duration = datetime_diff(\\\"minute\\\",now(),TimeGenerated) | summarize AggregatedValue = min(Duration) by Computer, bin(TimeGenerated,5m), _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#4": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_NetworkIn_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM Network Read Alert\",\n \"description\": \"Policy to audit/deploy VM Network Read Alert\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10000000\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMHighNetworkInAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"ReadBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"VMNetworkInAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMHighNetworkInAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighNetworkInAlert')]\",\n \"description\": \"Log Alert for Virtual Machine NetworkIn\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"ReadBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"NetworkInterface\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#5": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_NetworkOut_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM Network Write Alert\",\n \"description\": \"Policy to audit/deploy VM Network Out Alert\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10000000\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMHighNetworkOutAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"WriteBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"VMNetworkOutAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMHighNetworkOutAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighNetworkOutAlert')]\",\n \"description\": \"Log Alert for Virtual Machine NetworkOut\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"WriteBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"NetworkInterface\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#6": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_OSDiskreadLatency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM OS Disk Read Latency Alert\",\n \"description\": \"Policy to audit/deploy VM OSDiskreadLatency Alert\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"25\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Disks to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMHighOSDiskReadLatencyAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"VMOSDiskreadLatencyAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMHighOSDiskReadLatencyAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighOSDiskReadLatencyAlert')]\",\n \"description\": \"Log Alert for Virtual Machine OSDiskreadLatency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#7": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_OSDiskSpace_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM OS Disk Space Alert\",\n \"description\": \"Policy to audit/deploy VM OSDiskSpace Alert\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"LessThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Disks to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMLowOSDiskSpaceAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"VMOSDiskSpaceAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMLowOSDiskSpaceAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMLowOSDiskSpaceAlert')]\",\n \"description\": \"Log Alert for Virtual Machine OSDiskSpace\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#8": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_OSDiskwriteLatency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM OS Disk Write Latency Alert\",\n \"description\": \"Policy to audit/deploy VM OSDiskwriteLatency Alert\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"25\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Disks to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMHighOSDiskWriteLatencyAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"VMOSDiskwriteLatencyAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMHighOSDiskWriteLatencyAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighOSDiskWriteLatencyAlert')]\",\n \"description\": \"Log Alert for Virtual Machine OSDiskwriteLatency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#9": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VM_CPU_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VM CPU Alert\",\n \"description\": \"Policy to audit/deploy VM CPU Alert\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"85\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Compute/virtualMachines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-VMHighCPUAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"1\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Processor\\\" and Name == \\\"UtilizationPercentage\\\" | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"VMCPUAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-VMHighCPUAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-VMHighCPUAlert')]\",\n \"description\": \"Log Alert for Virtual Machine CPU\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.Compute/virtualMachines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); let excludedVMSSNodes = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.Compute/virtualMachines\\\" | extend isVMSS = isnotempty(properties.virtualMachineScaleSet) | where isVMSS | project id, name); InsightsMetrics | where _ResourceId has \\\"Microsoft.Compute/virtualMachines\\\" | where _ResourceId !in~ (excludedResources) | where _ResourceId !in~ (excludedVMSSNodes) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Processor\\\" and Name == \\\"UtilizationPercentage\\\" | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"1\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"cloudEnv": "[environment().name]",
"defaultDeploymentLocationByCloudType": {
"AzureCloud": "northeurope",
diff --git a/patterns/alz/policyDefinitions/policies-Hybrid.json b/patterns/alz/policyDefinitions/policies-Hybrid.json
index d8fcb4bcd..16c440e4f 100644
--- a/patterns/alz/policyDefinitions/policies-Hybrid.json
+++ b/patterns/alz/policyDefinitions/policies-Hybrid.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "18189350643078411952"
+ "version": "0.28.1.47646",
+ "templateHash": "5891346277908099083"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,10 +115,10 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_dataDiskReadLatency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM Data Disk Read Latency Alert\",\r\n \"description\": \"Policy to audit/deploy VM dataDiskReadLatency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"30\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskReadLatencyAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMdataDiskReadLatencyAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskReadLatencyAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskReadLatencyAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine dataDiskReadLatency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#1": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_dataDiskSpace_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM Data Disk Space Alert\",\r\n \"description\": \"Policy to audit/deploy VM data Disk Space Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"LessThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMLowDataDiskSpaceAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMdataDiskSpaceAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMLowDataDiskSpaceAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMLowDataDiskSpaceAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine dataDiskSpace\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#10": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_Memory_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM Memory Alert\",\r\n \"description\": \"Policy to audit/deploy VM Memory Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"LessThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMLowMemoryAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" |where Namespace == \\\"Memory\\\" and Name == \\\"AvailableMB\\\" | extend TotalMemory = toreal(todynamic(Tags)[\\\"vm.azm.ms/memorySizeMB\\\"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0 | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMMemoryAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMLowMemoryAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMLowMemoryAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine Memory\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" |where Namespace == \\\"Memory\\\" and Name == \\\"AvailableMB\\\" | extend TotalMemory = toreal(todynamic(Tags)[\\\"vm.azm.ms/memorySizeMB\\\"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0 | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#11": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_Disconnected_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM Disconnected Alert\",\r\n \"description\": \"Policy to Deploy Hybrid VM Disconnected Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\",\r\n \"Count\"\r\n ],\r\n \"defaultValue\": \"Count\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"P1D\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"P1D\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMDisconnected')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": 0\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('arg(\\\"\\\").resources | where type == \\\"microsoft.hybridcompute/machines\\\" | where parse_json(tostring(tags.{0})) !in~ (\\\"{1}\\\") | where tostring(properties.status) == \\\"Disconnected\\\" | extend lastContactedDate = todatetime(properties.lastStatusChange) | where lastContactedDate <= ago({2}d) | extend status = tostring(properties.status) | project id, Computer=name, status, lastContactedDate', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'), parameters('threshold'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMDisconnectedAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMDisconnected')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMDisconnected')]\",\r\n \"description\": \"Hybrid VM in disconnected state. Not being connected, prevents extensions to be correctly managed from the portal and Azure policies to be correctly applied. Ensure that both server the specific service (Azure Hybrid Instance Metadata Service on Windows or azcmagent on Linux) are running.\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('arg(\\\"\\\").resources | where type == \\\"microsoft.hybridcompute/machines\\\" | where parse_json(tostring(tags.{0})) !in~ (\\\"{1}\\\") | where tostring(properties.status) == \\\"Disconnected\\\" | extend lastContactedDate = todatetime(properties.lastStatusChange) | where lastContactedDate <= ago({2}d) | extend status = tostring(properties.status) | project id, Computer=name, status, lastContactedDate', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'), parameters('threshold'))]\",\r\n \"resourceIdColumn\": \"id\",\r\n \"threshold\": 0,\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"false\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_dataDiskReadLatency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM Data Disk Read Latency Alert\",\n \"description\": \"Policy to audit/deploy VM dataDiskReadLatency Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"30\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskReadLatencyAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMdataDiskReadLatencyAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskReadLatencyAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskReadLatencyAlert')]\",\n \"description\": \"Log Alert for Virtual Machine dataDiskReadLatency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#1": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_dataDiskSpace_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM Data Disk Space Alert\",\n \"description\": \"Policy to audit/deploy VM data Disk Space Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"LessThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMLowDataDiskSpaceAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMdataDiskSpaceAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMLowDataDiskSpaceAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMLowDataDiskSpaceAlert')]\",\n \"description\": \"Log Alert for Virtual Machine dataDiskSpace\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#10": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_Memory_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM Memory Alert\",\n \"description\": \"Policy to audit/deploy VM Memory Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"LessThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMLowMemoryAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" |where Namespace == \\\"Memory\\\" and Name == \\\"AvailableMB\\\" | extend TotalMemory = toreal(todynamic(Tags)[\\\"vm.azm.ms/memorySizeMB\\\"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0 | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMMemoryAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMLowMemoryAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMLowMemoryAlert')]\",\n \"description\": \"Log Alert for Virtual Machine Memory\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" |where Namespace == \\\"Memory\\\" and Name == \\\"AvailableMB\\\" | extend TotalMemory = toreal(todynamic(Tags)[\\\"vm.azm.ms/memorySizeMB\\\"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0 | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#11": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_Disconnected_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM Disconnected Alert\",\n \"description\": \"Policy to Deploy Hybrid VM Disconnected Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Maximum\",\n \"Minimum\",\n \"Total\",\n \"Count\"\n ],\n \"defaultValue\": \"Count\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"P1D\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"P1D\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMDisconnected')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": 0\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('arg(\\\"\\\").resources | where type == \\\"microsoft.hybridcompute/machines\\\" | where parse_json(tostring(tags.{0})) !in~ (\\\"{1}\\\") | where tostring(properties.status) == \\\"Disconnected\\\" | extend lastContactedDate = todatetime(properties.lastStatusChange) | where lastContactedDate <= ago({2}d) | extend status = tostring(properties.status) | project id, Computer=name, status, lastContactedDate', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'), parameters('threshold'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMDisconnectedAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMDisconnected')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMDisconnected')]\",\n \"description\": \"Hybrid VM in disconnected state. Not being connected, prevents extensions to be correctly managed from the portal and Azure policies to be correctly applied. Ensure that both server the specific service (Azure Hybrid Instance Metadata Service on Windows or azcmagent on Linux) are running.\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('arg(\\\"\\\").resources | where type == \\\"microsoft.hybridcompute/machines\\\" | where parse_json(tostring(tags.{0})) !in~ (\\\"{1}\\\") | where tostring(properties.status) == \\\"Disconnected\\\" | extend lastContactedDate = todatetime(properties.lastStatusChange) | where lastContactedDate <= ago({2}d) | extend status = tostring(properties.status) | project id, Computer=name, status, lastContactedDate', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'), parameters('threshold'))]\",\n \"resourceIdColumn\": \"id\",\n \"threshold\": 0,\n \"operator\": \"[[parameters('operator')]\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"false\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"$fxv#12": {
"type": "Microsoft.Authorization/policySetDefinitions",
"apiVersion": "2021-06-01",
@@ -2738,14 +2738,14 @@
"policyDefinitionGroups": null
}
},
- "$fxv#2": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_dataDiskWriteLatency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM Data Disk Write Latency Alert\",\r\n \"description\": \"Policy to audit/deploy VM dataDiskWriteLatency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"30\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskWriteLatencyAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMdataDiskWriteLatencyAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskWriteLatencyAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskWriteLatencyAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine dataDiskWriteLatency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#3": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_HeartBeat_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM HeartBeat Alert\",\r\n \"description\": \"Policy to audit/deploy VM HeartBeat Alert for all VMs in the subscription\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHeartBeatAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); Heartbeat | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | summarize TimeGenerated=max(TimeGenerated) by Computer, _ResourceId | extend Duration = datetime_diff(\\\"minute\\\",now(),TimeGenerated) | summarize AggregatedValue = min(Duration) by Computer, bin(TimeGenerated,5m), _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMHeartBeatAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHeartBeatAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHeartBeatAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine Heartbeat\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); Heartbeat | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | summarize TimeGenerated=max(TimeGenerated) by Computer, _ResourceId | extend Duration = datetime_diff(\\\"minute\\\",now(),TimeGenerated) | summarize AggregatedValue = min(Duration) by Computer, bin(TimeGenerated,5m), _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#4": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_NetworkIn_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM Network Read Alert\",\r\n \"description\": \"Policy to audit/deploy VM Nework Read Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10000000\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkInAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"ReadBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMVMNetworkInAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkInAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkInAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine NetworkIn\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"ReadBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"NetworkInterface\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#5": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_NetworkOut_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM Network Write Alert\",\r\n \"description\": \"Policy to audit/deploy VM Network Out Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10000000\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Computers to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkOutAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"WriteBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMVMNetworkOutAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkOutAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkOutAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine NetworkOut\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"WriteBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"NetworkInterface\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#6": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_OSDiskreadLatency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM OS Disk Read Latency Alert\",\r\n \"description\": \"Policy to audit/deploy VM OSDiskreadLatency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"30\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Disks to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskReadLatencyAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMOSDiskreadLatencyAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskReadLatencyAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskReadLatencyAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine OSDiskreadLatency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#7": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_OSDiskSpace_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM OS Disk Space Alert\",\r\n \"description\": \"Policy to audit/deploy VM OSDiskSpace Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"LessThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"10\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Disks to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMLowOSDiskSpaceAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMOSDiskSpaceAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMLowOSDiskSpaceAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMLowOSDiskSpaceAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine OSDiskSpace\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#8": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_OSDiskwriteLatency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM OS Disk Write Latency Alert\",\r\n \"description\": \"Policy to audit/deploy VM OSDiskwriteLatency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"50\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Disks to be included to be monitored\",\r\n \"description\": \"Array of Computer to be monitored\"\r\n },\r\n \"defaultValue\": [\r\n \"*\"\r\n ]\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskWriteLatencyAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"computersToInclude\": {\r\n \"type\": \"array\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMOSDiskwriteLatencyAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskWriteLatencyAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskWriteLatencyAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine OSDiskwriteLatency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": \"[[parameters('computersToInclude')]\"\r\n },\r\n {\r\n \"name\": \"Disk\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"computersToInclude\": {\r\n \"value\": \"[[parameters('computersToInclude')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#9": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Hybrid_VM_CPU_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Hybrid VM CPU Alert\",\r\n \"description\": \"Policy to audit/deploy VM CPU Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Hybrid Compute\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"Equals\",\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\",\r\n \"LessThan\",\r\n \"LessThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Average\",\r\n \"Count\",\r\n \"Maximum\",\r\n \"Minimum\",\r\n \"Total\"\r\n ],\r\n \"defaultValue\": \"Average\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"PT24H\"\r\n ],\r\n \"defaultValue\": \"PT15M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Resolve\",\r\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\r\n },\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"85\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.HybridCompute/machines\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\r\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighCPUAlert')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[subscription().id]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"1\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Processor\\\" and Name == \\\"UtilizationPercentage\\\" | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolve\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoResolveTime\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"HybridVMCPUAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighCPUAlert')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighCPUAlert')]\",\r\n \"description\": \"Log Alert for Virtual Machine CPU\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"targetResourceTypes\": [\r\n \"Microsoft.HybridCompute/machines\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Processor\\\" and Name == \\\"UtilizationPercentage\\\" | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"resourceIdColumn\": \"_ResourceId\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"1\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"ruleResolveConfiguration\": {\r\n \"autoResolved\": \"[[parameters('autoResolve')]\",\r\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"autoResolve\": {\r\n \"value\": \"[[parameters('autoResolve')]\"\r\n },\r\n \"autoResolveTime\": {\r\n \"value\": \"[[parameters('autoResolveTime')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#2": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_dataDiskWriteLatency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM Data Disk Write Latency Alert\",\n \"description\": \"Policy to audit/deploy VM dataDiskWriteLatency Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"30\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskWriteLatencyAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMdataDiskWriteLatencyAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskWriteLatencyAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighDataDiskWriteLatencyAlert')]\",\n \"description\": \"Log Alert for Virtual Machine dataDiskWriteLatency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk !in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#3": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_HeartBeat_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM HeartBeat Alert\",\n \"description\": \"Policy to audit/deploy VM HeartBeat Alert for all VMs in the subscription\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHeartBeatAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); Heartbeat | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | summarize TimeGenerated=max(TimeGenerated) by Computer, _ResourceId | extend Duration = datetime_diff(\\\"minute\\\",now(),TimeGenerated) | summarize AggregatedValue = min(Duration) by Computer, bin(TimeGenerated,5m), _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMHeartBeatAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHeartBeatAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHeartBeatAlert')]\",\n \"description\": \"Log Alert for Virtual Machine Heartbeat\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); Heartbeat | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | summarize TimeGenerated=max(TimeGenerated) by Computer, _ResourceId | extend Duration = datetime_diff(\\\"minute\\\",now(),TimeGenerated) | summarize AggregatedValue = min(Duration) by Computer, bin(TimeGenerated,5m), _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#4": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_NetworkIn_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM Network Read Alert\",\n \"description\": \"Policy to audit/deploy VM Nework Read Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10000000\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkInAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"ReadBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMVMNetworkInAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkInAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkInAlert')]\",\n \"description\": \"Log Alert for Virtual Machine NetworkIn\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"ReadBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"NetworkInterface\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#5": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_NetworkOut_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM Network Write Alert\",\n \"description\": \"Policy to audit/deploy VM Network Out Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10000000\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Computers to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkOutAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"WriteBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMVMNetworkOutAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkOutAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighNetworkOutAlert')]\",\n \"description\": \"Log Alert for Virtual Machine NetworkOut\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Network\\\" and Name == \\\"WriteBytesPerSecond\\\" | extend NetworkInterface=tostring(todynamic(Tags)[\\\"vm.azm.ms/networkDeviceId\\\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"NetworkInterface\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#6": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_OSDiskreadLatency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM OS Disk Read Latency Alert\",\n \"description\": \"Policy to audit/deploy VM OSDiskreadLatency Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"30\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Disks to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskReadLatencyAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMOSDiskreadLatencyAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskReadLatencyAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskReadLatencyAlert')]\",\n \"description\": \"Log Alert for Virtual Machine OSDiskreadLatency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"ReadLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#7": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_OSDiskSpace_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM OS Disk Space Alert\",\n \"description\": \"Policy to audit/deploy VM OSDiskSpace Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"LessThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"10\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Disks to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMLowOSDiskSpaceAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMOSDiskSpaceAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMLowOSDiskSpaceAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMLowOSDiskSpaceAlert')]\",\n \"description\": \"Log Alert for Virtual Machine OSDiskSpace\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"FreeSpacePercentage\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#8": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_OSDiskwriteLatency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM OS Disk Write Latency Alert\",\n \"description\": \"Policy to audit/deploy VM OSDiskwriteLatency Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"50\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"computersToInclude\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Disks to be included to be monitored\",\n \"description\": \"Array of Computer to be monitored\"\n },\n \"defaultValue\": [\n \"*\"\n ]\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskWriteLatencyAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"computersToInclude\": {\n \"type\": \"array\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMOSDiskwriteLatencyAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskWriteLatencyAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighOSDiskWriteLatencyAlert')]\",\n \"description\": \"Log Alert for Virtual Machine OSDiskwriteLatency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId has \\\"Microsoft.HybridCompute/machines\\\" | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"LogicalDisk\\\" and Name == \\\"WriteLatencyMs\\\" | extend Disk=tostring(todynamic(Tags)[\\\"vm.azm.ms/mountId\\\"]) | where Disk in (\\\"C:\\\",\\\"/\\\") | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": \"[[parameters('computersToInclude')]\"\n },\n {\n \"name\": \"Disk\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"computersToInclude\": {\n \"value\": \"[[parameters('computersToInclude')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#9": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Hybrid_VM_CPU_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Hybrid VM CPU Alert\",\n \"description\": \"Policy to audit/deploy VM CPU Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Hybrid Compute\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"Equals\",\n \"GreaterThan\",\n \"GreaterThanOrEqual\",\n \"LessThan\",\n \"LessThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Average\",\n \"Count\",\n \"Maximum\",\n \"Minimum\",\n \"Total\"\n ],\n \"defaultValue\": \"Average\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"PT24H\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolve\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Resolve\",\n \"description\": \"Auto Resolve time for the alert in ISO 8601 format\"\n },\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"85\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.HybridCompute/machines\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/displayName\",\n \"equals\": \"[[concat(subscription().displayName, '-HybridVMHighCPUAlert')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[subscription().id]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"1\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Processor\\\" and Name == \\\"UtilizationPercentage\\\" | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"autoResolve\": {\n \"type\": \"String\"\n },\n \"autoResolveTime\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"HybridVMCPUAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(subscription().displayName, '-HybridVMHighCPUAlert')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(subscription().displayName, '-HybridVMHighCPUAlert')]\",\n \"description\": \"Log Alert for Virtual Machine CPU\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"targetResourceTypes\": [\n \"Microsoft.HybridCompute/machines\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.HybridCompute/machines\\\" | project _ResourceId = id, tags | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\")); InsightsMetrics | where _ResourceId !in~ (excludedResources) | where Origin == \\\"vm.azm.ms\\\" | where Namespace == \\\"Processor\\\" and Name == \\\"UtilizationPercentage\\\" | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"metricMeasureColumn\": \"AggregatedValue\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"resourceIdColumn\": \"_ResourceId\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"dimensions\": [\n {\n \"name\": \"Computer\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"1\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"ruleResolveConfiguration\": {\n \"autoResolved\": \"[[parameters('autoResolve')]\",\n \"timeToResolve\": \"[[parameters('autoResolveTime')]\"\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"autoResolve\": {\n \"value\": \"[[parameters('autoResolve')]\"\n },\n \"autoResolveTime\": {\n \"value\": \"[[parameters('autoResolveTime')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"cloudEnv": "[environment().name]",
"defaultDeploymentLocationByCloudType": {
"AzureCloud": "northeurope",
diff --git a/patterns/alz/policyDefinitions/policies-KeyManagement.json b/patterns/alz/policyDefinitions/policies-KeyManagement.json
index 2bfc857a7..4b8a58b0e 100644
--- a/patterns/alz/policyDefinitions/policies-KeyManagement.json
+++ b/patterns/alz/policyDefinitions/policies-KeyManagement.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "11014040661389835050"
+ "version": "0.28.1.47646",
+ "templateHash": "11876353201732112395"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,11 +115,11 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_KeyVault_Availability_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Key Vault Availability Alert\",\r\n \"description\": \"Policy to audit/deploy KeyVault Availability Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Key Vault\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.keyvault/vaults\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.keyvault/vaults\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"Availability\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.keyvault/vaults/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-Availability')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for KeyVault Availability\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"Availability\",\r\n \"metricNamespace\": \"microsoft.keyvault/vaults\",\r\n \"metricName\": \"Availability\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#1": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_KeyVault_Capacity_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Key Vault Capacity Alert\",\r\n \"description\": \"Policy to audit/deploy KeyVault Capacity Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Key Vault\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"75\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.keyvault/vaults\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.keyvault/vaults\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"SaturationShoebox\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.keyvault/vaults/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-CapacityAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for KeyVault Capacity\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"SaturationShoebox\",\r\n \"metricNamespace\": \"microsoft.keyvault/vaults\",\r\n \"metricName\": \"SaturationShoebox\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#2": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_KeyVault_Latency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Key Vault Latency Alert\",\r\n \"description\": \"Policy to audit/deploy KeyVault Latency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Key Vault\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"3\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1000\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.keyvault/vaults\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.keyvault/vaults\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ServiceApiLatency\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.keyvault/vaults/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-LatencyAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for KeyVault Latency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ServiceApiLatency\",\r\n \"metricNamespace\": \"microsoft.keyvault/vaults\",\r\n \"metricName\": \"ServiceApiLatency\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#3": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_KeyVault_Requests_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Key Vault Requests Alert\",\r\n \"description\": \"Policy to audit/deploy KeyVault Requests Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Key Vault\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.keyvault/vaults\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.keyvault/vaults\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ServiceApiResult\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.keyvault/vaults/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 4\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 4\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-RequestsAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for KeyVault Requests\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"ServiceApiResult\",\r\n \"metricNamespace\": \"microsoft.keyvault/vaults\",\r\n \"metricName\": \"ServiceApiResult\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#4": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_KeyVault_Delete\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Activity Log Key Vault Delete Alert\",\r\n \"description\": \"Policy to Deploy Activity Log Key Vault Delete Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.1.0\",\r\n \"category\": \"Key Vault\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.keyvault/vaults\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"name\": \"ActivityKeyVaultDelete\",\r\n \"existenceScope\": \"resourcegroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Administrative\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"operationName\"\r\n },\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Microsoft.KeyVault/vaults/delete\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ActivityKeyVaultDelete\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ActivityKeyVaultDelete\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Activity Log Key Vault Delete\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\"\r\n },\r\n {\r\n \"field\": \"operationName\",\r\n \"equals\": \"Microsoft.KeyVault/vaults/delete\"\r\n },\r\n {\r\n \"field\": \"status\",\r\n \"containsAny\": [\r\n \"succeeded\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_KeyVault_Availability_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Key Vault Availability Alert\",\n \"description\": \"Policy to audit/deploy KeyVault Availability Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Key Vault\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.keyvault/vaults\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.keyvault/vaults\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"Availability\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.keyvault/vaults/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-Availability')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for KeyVault Availability\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"Availability\",\n \"metricNamespace\": \"microsoft.keyvault/vaults\",\n \"metricName\": \"Availability\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#1": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_KeyVault_Capacity_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Key Vault Capacity Alert\",\n \"description\": \"Policy to audit/deploy KeyVault Capacity Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Key Vault\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"75\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.keyvault/vaults\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.keyvault/vaults\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"SaturationShoebox\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.keyvault/vaults/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-CapacityAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for KeyVault Capacity\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"SaturationShoebox\",\n \"metricNamespace\": \"microsoft.keyvault/vaults\",\n \"metricName\": \"SaturationShoebox\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#2": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_KeyVault_Latency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Key Vault Latency Alert\",\n \"description\": \"Policy to audit/deploy KeyVault Latency Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Key Vault\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"3\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1000\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.keyvault/vaults\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.keyvault/vaults\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ServiceApiLatency\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.keyvault/vaults/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-LatencyAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for KeyVault Latency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ServiceApiLatency\",\n \"metricNamespace\": \"microsoft.keyvault/vaults\",\n \"metricName\": \"ServiceApiLatency\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#3": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_KeyVault_Requests_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Key Vault Requests Alert\",\n \"description\": \"Policy to audit/deploy KeyVault Requests Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Key Vault\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.keyvault/vaults\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.keyvault/vaults\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ServiceApiResult\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.keyvault/vaults/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 4\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 4\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-RequestsAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for KeyVault Requests\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"ServiceApiResult\",\n \"metricNamespace\": \"microsoft.keyvault/vaults\",\n \"metricName\": \"ServiceApiResult\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#4": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_KeyVault_Delete\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Activity Log Key Vault Delete Alert\",\n \"description\": \"Policy to Deploy Activity Log Key Vault Delete Alert\",\n \"metadata\": {\n \"version\": \"1.1.0\",\n \"category\": \"Key Vault\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.keyvault/vaults\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"name\": \"ActivityKeyVaultDelete\",\n \"existenceScope\": \"resourcegroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Administrative\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"operationName\"\n },\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Microsoft.KeyVault/vaults/delete\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActivityKeyVaultDelete\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ActivityKeyVaultDelete\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Activity Log Key Vault Delete\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"Administrative\"\n },\n {\n \"field\": \"operationName\",\n \"equals\": \"Microsoft.KeyVault/vaults/delete\"\n },\n {\n \"field\": \"status\",\n \"containsAny\": [\n \"succeeded\"\n ]\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"$fxv#5": {
"type": "Microsoft.Authorization/policySetDefinitions",
"apiVersion": "2021-06-01",
diff --git a/patterns/alz/policyDefinitions/policies-Monitoring.json b/patterns/alz/policyDefinitions/policies-Monitoring.json
index 37459bad9..19f43a50a 100644
--- a/patterns/alz/policyDefinitions/policies-Monitoring.json
+++ b/patterns/alz/policyDefinitions/policies-Monitoring.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "14790132956141127583"
+ "version": "0.28.1.47646",
+ "templateHash": "12337504470054429631"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,9 +115,9 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_LAWorkspace_Delete\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Activity Log LA Workspace Delete Alert\",\r\n \"description\": \"Policy to Deploy Activity Log LA Workspace Delete Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.1.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.OperationalInsights/workspaces\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"name\": \"ActivityLAWorkspaceDelete\",\r\n \"existenceScope\": \"resourcegroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Administrative\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"operationName\"\r\n },\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Microsoft.OperationalInsights/workspaces/delete\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ActivityLAWorkspaceDelete\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ActivityLAWorkspaceDelete\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Activity Log LA Workspace Delete\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\"\r\n },\r\n {\r\n \"field\": \"operationName\",\r\n \"equals\": \"Microsoft.OperationalInsights/workspaces/delete\"\r\n },\r\n {\r\n \"field\": \"status\",\r\n \"containsAny\": [\r\n \"succeeded\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#1": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_LAWorkspace_KeyRegen\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Activity Log LA Workspace Regenerate Key Alert\",\r\n \"description\": \"Policy to Deploy Activity Log LA Workspace Regenerate Key Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.1.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.OperationalInsights/workspaces\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"name\": \"ActivityLAWorkspaceRegenKey\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Administrative\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"operationName\"\r\n },\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Microsoft.OperationalInsights/workspaces/regeneratesharedkey/action\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ActivityLAWorkspaceRegenKey\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ActivityLAWorkspaceRegenKey\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Activity Log LA Workspace Regenerate Key\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\"\r\n },\r\n {\r\n \"field\": \"operationName\",\r\n \"equals\": \"Microsoft.OperationalInsights/workspaces/regeneratesharedkey/action\"\r\n },\r\n {\r\n \"field\": \"status\",\r\n \"containsAny\": [\r\n \"succeeded\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#2": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_LAWorkspace_DailyCapLimitReached_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy LA Workspace Daily Cap Limit Reached Alert\",\r\n \"description\": \"Policy to audit/deploy LA Workspace Daily Cap Limit Reached Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.0.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"\",\r\n \"metadata\": {\r\n \"description\": \"The resource Id of the user assigned managed identity.\",\r\n \"displayName\": \"User Assigned managed Identity resource Id.\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Operator\"\r\n },\r\n \"allowedValues\": [\r\n \"GreaterThan\",\r\n \"GreaterThanOrEqual\"\r\n ],\r\n \"defaultValue\": \"GreaterThan\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"TimeAggregation\"\r\n },\r\n \"allowedValues\": [\r\n \"Count\"\r\n ],\r\n \"defaultValue\": \"Count\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT10M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT45M\",\r\n \"PT1H\",\r\n \"PT2H\",\r\n \"PT3H\",\r\n \"PT4H\",\r\n \"PT5H\",\r\n \"PT6H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"P1D\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT5M\",\r\n \"PT10M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT45M\",\r\n \"PT1H\",\r\n \"PT2H\",\r\n \"PT3H\",\r\n \"PT4H\",\r\n \"PT5H\",\r\n \"PT6H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT1H\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"0\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Failing Periods\",\r\n \"description\": \"Number of failing periods before alert is fired\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Periods\",\r\n \"description\": \"The number of aggregated lookback points.\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.OperationalInsights/workspaces\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.OperationalInsights/workspaces/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\r\n \"equals\": \"[[parameters('operator')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\r\n \"equals\": \"[[parameters('timeAggregation')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": \"[[parameters('failingPeriods')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\r\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.OperationalInsights/workspaces\\\" | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\") | project customerId = tostring(properties.customerId)); let workspaceResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.OperationalInsights/workspaces\\\" | project id, customerId = tostring(properties.customerId), workspaceName = tostring(name)); Operation | where TenantId !in~ (excludedResources) | where OperationCategory == \\\"Data Collection Status\\\" | where Detail has_any(\\\"RespectQuota\\\", \\\"OverQuota\\\") | summarize arg_max(TimeGenerated, *) by TenantId | where Detail has \\\"OverQuota\\\" | join hint.remote=left kind=inner workspaceResources on $left.TenantId == $right.customerId | project TimeGenerated, id, workspaceName, workspaceId = TenantId, Detail', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\r\n },\r\n {\r\n \"field\": \"identity.userAssignedIdentities\",\r\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"resourceLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceLocation\",\r\n \"description\": \"Location of the resource\"\r\n }\r\n },\r\n \"UAMIResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n },\r\n \"operator\": {\r\n \"type\": \"String\"\r\n },\r\n \"timeAggregation\": {\r\n \"type\": \"String\"\r\n },\r\n \"failingPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\r\n \"apiVersion\": \"2022-08-01-preview\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DailyCapLimitReachedAlert')]\",\r\n \"location\": \"[[parameters('resourceLocation')]\",\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"[[parameters('UAMIResourceId')]\": {}\r\n }\r\n },\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"displayName\": \"[[concat(parameters('resourceName'), '-DailyCapLimitReachedAlert')]\",\r\n \"description\": \"Log Alert for Daily Cap Limit Reached\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.OperationalInsights/workspaces\\\" | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\") | project customerId = tostring(properties.customerId)); let workspaceResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.OperationalInsights/workspaces\\\" | project id, customerId = tostring(properties.customerId), workspaceName = tostring(name)); Operation | where TenantId !in~ (excludedResources) | where OperationCategory == \\\"Data Collection Status\\\" | where Detail has_any(\\\"RespectQuota\\\", \\\"OverQuota\\\") | summarize arg_max(TimeGenerated, *) by TenantId | where Detail has \\\"OverQuota\\\" | join hint.remote=left kind=inner workspaceResources on $left.TenantId == $right.customerId | project TimeGenerated, id, workspaceName, workspaceId = TenantId, Detail', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"operator\": \"[[parameters('operator')]\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"workspaceName\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n \"resourceIdColumn\": \"id\",\r\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\r\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"resourceLocation\": {\r\n \"value\": \"[[field('location')]\"\r\n },\r\n \"UAMIResourceId\": {\r\n \"value\": \"[[parameters('UAMIResourceId')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n },\r\n \"operator\": {\r\n \"value\": \"[[parameters('operator')]\"\r\n },\r\n \"timeAggregation\": {\r\n \"value\": \"[[parameters('timeAggregation')]\"\r\n },\r\n \"failingPeriods\": {\r\n \"value\": \"[[parameters('failingPeriods')]\"\r\n },\r\n \"evaluationPeriods\": {\r\n \"value\": \"[[parameters('evaluationPeriods')]\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_LAWorkspace_Delete\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Activity Log LA Workspace Delete Alert\",\n \"description\": \"Policy to Deploy Activity Log LA Workspace Delete Alert\",\n \"metadata\": {\n \"version\": \"1.1.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.OperationalInsights/workspaces\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"name\": \"ActivityLAWorkspaceDelete\",\n \"existenceScope\": \"resourcegroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Administrative\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"operationName\"\n },\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Microsoft.OperationalInsights/workspaces/delete\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActivityLAWorkspaceDelete\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ActivityLAWorkspaceDelete\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Activity Log LA Workspace Delete\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"Administrative\"\n },\n {\n \"field\": \"operationName\",\n \"equals\": \"Microsoft.OperationalInsights/workspaces/delete\"\n },\n {\n \"field\": \"status\",\n \"containsAny\": [\n \"succeeded\"\n ]\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#1": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_LAWorkspace_KeyRegen\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Activity Log LA Workspace Regenerate Key Alert\",\n \"description\": \"Policy to Deploy Activity Log LA Workspace Regenerate Key Alert\",\n \"metadata\": {\n \"version\": \"1.1.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.OperationalInsights/workspaces\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"name\": \"ActivityLAWorkspaceRegenKey\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Administrative\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"operationName\"\n },\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Microsoft.OperationalInsights/workspaces/regeneratesharedkey/action\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActivityLAWorkspaceRegenKey\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ActivityLAWorkspaceRegenKey\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Activity Log LA Workspace Regenerate Key\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"Administrative\"\n },\n {\n \"field\": \"operationName\",\n \"equals\": \"Microsoft.OperationalInsights/workspaces/regeneratesharedkey/action\"\n },\n {\n \"field\": \"status\",\n \"containsAny\": [\n \"succeeded\"\n ]\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#2": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_LAWorkspace_DailyCapLimitReached_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy LA Workspace Daily Cap Limit Reached Alert\",\n \"description\": \"Policy to audit/deploy LA Workspace Daily Cap Limit Reached Alert\",\n \"metadata\": {\n \"version\": \"1.0.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"UAMIResourceId\": {\n \"type\": \"string\",\n \"defaultValue\": \"\",\n \"metadata\": {\n \"description\": \"The resource Id of the user assigned managed identity.\",\n \"displayName\": \"User Assigned managed Identity resource Id.\"\n }\n },\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"operator\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Operator\"\n },\n \"allowedValues\": [\n \"GreaterThan\",\n \"GreaterThanOrEqual\"\n ],\n \"defaultValue\": \"GreaterThan\"\n },\n \"timeAggregation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"TimeAggregation\"\n },\n \"allowedValues\": [\n \"Count\"\n ],\n \"defaultValue\": \"Count\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT10M\",\n \"PT15M\",\n \"PT30M\",\n \"PT45M\",\n \"PT1H\",\n \"PT2H\",\n \"PT3H\",\n \"PT4H\",\n \"PT5H\",\n \"PT6H\",\n \"P1D\"\n ],\n \"defaultValue\": \"P1D\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT5M\",\n \"PT10M\",\n \"PT15M\",\n \"PT30M\",\n \"PT45M\",\n \"PT1H\",\n \"PT2H\",\n \"PT3H\",\n \"PT4H\",\n \"PT5H\",\n \"PT6H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT1H\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"0\"\n },\n \"failingPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Failing Periods\",\n \"description\": \"Number of failing periods before alert is fired\"\n },\n \"defaultValue\": \"1\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Periods\",\n \"description\": \"The number of aggregated lookback points.\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.OperationalInsights/workspaces\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.OperationalInsights/workspaces/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].operator\",\n \"equals\": \"[[parameters('operator')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].timeAggregation\",\n \"equals\": \"[[parameters('timeAggregation')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": \"[[parameters('evaluationPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": \"[[parameters('failingPeriods')]\"\n },\n {\n \"field\": \"Microsoft.Insights/scheduledQueryRules/criteria.allOf[*].query\",\n \"equals\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.OperationalInsights/workspaces\\\" | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\") | project customerId = tostring(properties.customerId)); let workspaceResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.OperationalInsights/workspaces\\\" | project id, customerId = tostring(properties.customerId), workspaceName = tostring(name)); Operation | where TenantId !in~ (excludedResources) | where OperationCategory == \\\"Data Collection Status\\\" | where Detail has_any(\\\"RespectQuota\\\", \\\"OverQuota\\\") | summarize arg_max(TimeGenerated, *) by TenantId | where Detail has \\\"OverQuota\\\" | join hint.remote=left kind=inner workspaceResources on $left.TenantId == $right.customerId | project TimeGenerated, id, workspaceName, workspaceId = TenantId, Detail', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\"\n },\n {\n \"field\": \"identity.userAssignedIdentities\",\n \"containsKey\": \"[[parameters('UAMIResourceId')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"resourceLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceLocation\",\n \"description\": \"Location of the resource\"\n }\n },\n \"UAMIResourceId\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n },\n \"operator\": {\n \"type\": \"String\"\n },\n \"timeAggregation\": {\n \"type\": \"String\"\n },\n \"failingPeriods\": {\n \"type\": \"String\"\n },\n \"evaluationPeriods\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/scheduledQueryRules\",\n \"apiVersion\": \"2022-08-01-preview\",\n \"name\": \"[[concat(parameters('resourceName'), '-DailyCapLimitReachedAlert')]\",\n \"location\": \"[[parameters('resourceLocation')]\",\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"[[parameters('UAMIResourceId')]\": {}\n }\n },\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"displayName\": \"[[concat(parameters('resourceName'), '-DailyCapLimitReachedAlert')]\",\n \"description\": \"Log Alert for Daily Cap Limit Reached\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"query\": \"[[format('let excludedResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.OperationalInsights/workspaces\\\" | where parse_json(tostring(tags.{0})) in~ (\\\"{1}\\\") | project customerId = tostring(properties.customerId)); let workspaceResources = (arg(\\\"\\\").resources | where type =~ \\\"Microsoft.OperationalInsights/workspaces\\\" | project id, customerId = tostring(properties.customerId), workspaceName = tostring(name)); Operation | where TenantId !in~ (excludedResources) | where OperationCategory == \\\"Data Collection Status\\\" | where Detail has_any(\\\"RespectQuota\\\", \\\"OverQuota\\\") | summarize arg_max(TimeGenerated, *) by TenantId | where Detail has \\\"OverQuota\\\" | join hint.remote=left kind=inner workspaceResources on $left.TenantId == $right.customerId | project TimeGenerated, id, workspaceName, workspaceId = TenantId, Detail', parameters('MonitorDisableTagName'), join(parameters('MonitorDisableTagValues'), '\\\",\\\"'))]\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"operator\": \"[[parameters('operator')]\",\n \"dimensions\": [\n {\n \"name\": \"workspaceName\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ],\n \"resourceIdColumn\": \"id\",\n \"timeAggregation\": \"[[parameters('timeAggregation')]\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": \"[[parameters('evaluationPeriods')]\",\n \"minFailingPeriodsToAlert\": \"[[parameters('failingPeriods')]\"\n }\n }\n ]\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"resourceLocation\": {\n \"value\": \"[[field('location')]\"\n },\n \"UAMIResourceId\": {\n \"value\": \"[[parameters('UAMIResourceId')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n },\n \"operator\": {\n \"value\": \"[[parameters('operator')]\"\n },\n \"timeAggregation\": {\n \"value\": \"[[parameters('timeAggregation')]\"\n },\n \"failingPeriods\": {\n \"value\": \"[[parameters('failingPeriods')]\"\n },\n \"evaluationPeriods\": {\n \"value\": \"[[parameters('evaluationPeriods')]\"\n },\n \"MonitorDisableTagName\": {\n \"value\": \"[[parameters('MonitorDisableTagName')]\"\n },\n \"MonitorDisableTagValues\": {\n \"value\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"cloudEnv": "[environment().name]",
"defaultDeploymentLocationByCloudType": {
"AzureCloud": "northeurope",
diff --git a/patterns/alz/policyDefinitions/policies-Network.json b/patterns/alz/policyDefinitions/policies-Network.json
index f3edde62c..37f8727f7 100644
--- a/patterns/alz/policyDefinitions/policies-Network.json
+++ b/patterns/alz/policyDefinitions/policies-Network.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "13858254978134692213"
+ "version": "0.28.1.47646",
+ "templateHash": "6522991801630385439"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,68 +115,68 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_Firewall_Delete\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Activity Log Azure FireWall Delete Alert\",\r\n \"description\": \"Policy to Deploy Activity Log Azure Firewall Delete Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.1.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/azureFirewalls\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"name\": \"ActivityAzureFirewallDelete\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Administrative\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"operationName\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Microsoft.Network/azureFirewalls/delete\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ActivityAzureFirewallDelete\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ActivityAzureFirewallDelete\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Activity Log Firewall Delete\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\"\r\n },\r\n {\r\n \"field\": \"operationName\",\r\n \"equals\": \"Microsoft.Network/azurefirewalls/delete\"\r\n },\r\n {\r\n \"field\": \"status\",\r\n \"containsAny\": [\r\n \"succeeded\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#1": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AFW_FirewallHealth_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AFW FirewallHealth Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Firewall FirewallHealth Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/azureFirewalls\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/azureFirewalls\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"FirewallHealth\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/azureFirewalls/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-FirewallHealth')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for AFW FirewallHealth\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"FirewallHealth\",\r\n \"metricNamespace\": \"Microsoft.Network/azureFirewalls\",\r\n \"metricName\": \"FirewallHealth\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#10": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERP_ExpressRouteBitsIn_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ER Direct ExpressRoute Bits In Alert\",\r\n \"description\": \"Policy to audit/deploy ER Direct Connection BitsInPerSecond Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"PortBitsInPerSecond\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERBitsInAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ER Direct Connection BitsInPerSecond\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"PortBitsInPerSecond\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\r\n \"metricName\": \"PortBitsInPerSecond\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#11": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERP_ExpressRouteBitsOut_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ER Direct ExpressRoute Bits Out Alert\",\r\n \"description\": \"Policy to audit/deploy ER Direct Connection BitsOutPerSecond Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"PortBitsOutPerSecond\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERBitsOutAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ER Direct Connection BitsOutPerSecond\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"PortBitsOutPerSecond\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\r\n \"metricName\": \"PortBitsOutPerSecond\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#12": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERP_ExpressRoutLineProtocol_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ER Direct ExpressRoute LineProtocol Alert\",\r\n \"description\": \"Policy to audit/deploy ER Direct LineProtocol Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"0.9\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"LineProtocol\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERLineProtocolAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ER Direct Connection LineProtocolPerSecond\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"LineProtocol\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\r\n \"metricName\": \"LineProtocol\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#13": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERP_ExpressRoutRxLightLevel_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ER Direct ExpressRoute RxLightLevel High Alert\",\r\n \"description\": \"Policy to audit/deploy ER Direct RxLightLevel High Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"0\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"RxLightLevel\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERRxLightLevelHighAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ER Direct Connection RxLightLevelHigh\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"RxLightLevel\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\r\n \"metricName\": \"RxLightLevel\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#14": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERP_ExpressRoutRxLightLevellow_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ER Direct ExpressRoute RxLightLevel Low Alert\",\r\n \"description\": \"Policy to audit/deploy ER Direct RxLightLevel Low Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"-10\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"RxLightLevel\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERRxLightLevelLowAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ER Direct Connection RxLightLevelLow\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"RxLightLevel\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\r\n \"metricName\": \"RxLightLevel\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#15": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERP_ExpressRoutTxLightLevell_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ER Direct ExpressRoute TxLightLevel High Alert\",\r\n \"description\": \"Policy to audit/deploy ER Direct TxLightLevel High Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"0\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TxLightLevel\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERTxLightLevelHighAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ER Direct Connection TxLightLevelHigh\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"TxLightLevel\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\r\n \"metricName\": \"TxLightLevel\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#16": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERP_ExpressRoutTxLightLevellow_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ER Direct ExpressRoute TxLightLevel Low Alert\",\r\n \"description\": \"Policy to audit/deploy ER Direct TxLightLevel Low Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"-10\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TxLightLevel\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERTxLightLevelLowAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ER Direct Connection TxLightLevelLow\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"TxLightLevel\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\r\n \"metricName\": \"TxLightLevel\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#17": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_PDNSZ_CapacityUtil_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy PDNSZ Capacity Utilization Alert\",\r\n \"description\": \"Policy to audit/deploy Private DNS Zone Capacity Utilization Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT1H\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1H\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"80\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/privateDnsZones\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/privateDnsZones\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"VirtualNetworkLinkCapacityUtilization\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/privateDnsZones/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Maximum\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThanOrEqual\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-CapacityUtilizationAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Private DNS Zone Virtual Network Link Capacity Utilization\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"VirtualNetworkLinkCapacityUtilization\",\r\n \"metricNamespace\": \"Microsoft.Network/privateDnsZones\",\r\n \"metricName\": \"VirtualNetworkLinkCapacityUtilization\",\r\n \"operator\": \"GreaterThanOrEqual\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#18": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_PDNSZ_QueryVolume_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy PDNSZ Query Volume Alert\",\r\n \"description\": \"Policy to audit/deploy Private DNS Zone Query Volume Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"4\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT1H\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1H\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"500\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/privateDnsZones\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/privateDnsZones\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"QueryVolume\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/privateDnsZones/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Total\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThanOrEqual\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-QueryVolumeAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Private DNS Query Volume\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"QueryVolume\",\r\n \"metricNamespace\": \"Microsoft.Network/privateDnsZones\",\r\n \"metricName\": \"QueryVolume\",\r\n \"operator\": \"GreaterThanOrEqual\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Total\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#19": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_PDNSZ_RecordSetCapacity_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy PDNSZ Record Set Capacity Alert\",\r\n \"description\": \"Policy to audit/deploy Private DNS Zone Record Set Capacity Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT1H\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1H\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"80\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/privateDnsZones\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/privateDnsZones\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"RecordSetCapacityUtilization\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/privateDnsZones/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Maximum\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThanOrEqual\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-RecordSet_Capacity_Utilization')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Private DNS Zone Record Set Capacity Utilization\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"RecordSetCapacityUtilization\",\r\n \"metricNamespace\": \"Microsoft.Network/privateDnsZones\",\r\n \"metricName\": \"RecordSetCapacityUtilization\",\r\n \"operator\": \"GreaterThanOrEqual\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#2": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AFW_SNATPortUtilization_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AFW SNATPortUtilization Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Firewall SNATPortUtilization Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"80\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/azureFirewalls\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/azureFirewalls\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"SNATPortUtilization\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/azureFirewalls/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-SNATPortUtilization')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for AFW SNATPortUtilization\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"SNATPortUtilization\",\r\n \"metricNamespace\": \"Microsoft.Network/azureFirewalls\",\r\n \"metricName\": \"SNATPortUtilization\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#20": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_DNSZ_RegistrationCapacityUtil_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy PDNSZ Registration Capacity Utilization Alert\",\r\n \"description\": \"Policy to audit/deploy Private DNS Zone Registration Capacity Utilization Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT1H\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1H\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"80\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/privateDnsZones\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/privateDnsZones\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"VirtualNetworkWithRegistrationCapacityUtilization\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/privateDnsZones/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Maximum\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThanOrEqual\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-RequestsAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Private DNS Zone Registration Capacity Utilization\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"VirtualNetworkWithRegistrationCapacityUtilization\",\r\n \"metricNamespace\": \"Microsoft.Network/privateDnsZones\",\r\n \"metricName\": \"VirtualNetworkWithRegistrationCapacityUtilization\",\r\n \"operator\": \"GreaterThanOrEqual\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#21": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VnetGw_ExpressRouteBitsPerSecond_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VNetG ExpressRoute Bits Per Second Alert\",\r\n \"description\": \"Policy to audit/deploy Virtual Network Gateway Express Route Bits Per Second Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\r\n \"equals\": \"ExpressRoute\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ExpressRouteGatewayBitsPerSecond\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworkGateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayERBitsAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VNet Gateway Express Route Bits Per Second\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ExpressRouteGatewayBitsPerSecond\",\r\n \"metricNamespace\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"metricName\": \"ExpressRouteGatewayBitsPerSecond\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#22": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VnetGw_ExpressRouteCpuUtil_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VNetG ExpressRoute CPU Utilization Alert\",\r\n \"description\": \"Policy to audit/deploy Virtual Network Gateway Express Route CPU Utilization Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"80\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\r\n \"equals\": \"ExpressRoute\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ExpressRouteGatewayCpuUtilization\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworkGateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayERCPUAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VNet Gateway Express Route CPU Utilization\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ExpressRouteGatewayCpuUtilization\",\r\n \"metricNamespace\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"metricName\": \"ExpressRouteGatewayCpuUtilization\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#23": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VnetGw_TunnelBandwidth_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VNetG Tunnel Bandwidth Alert\",\r\n \"description\": \"Policy to audit/deploy Virtual Network Gateway Tunnel Bandwidth Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\r\n \"equals\": \"VPN\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelAverageBandwidth\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworkGateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelBandwidthAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VNet Gateway Tunnel Avg Bandwidth\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"TunnelAverageBandwidth\",\r\n \"metricNamespace\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"metricName\": \"TunnelAverageBandwidth\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#24": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VnetGw_TunnelEgress_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VNetG Tunnel Egress Alert\",\r\n \"description\": \"Policy to audit/deploy Virtual Network Gateway Tunnel Egress Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\r\n \"equals\": \"VPN\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelEgressBytes\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworkGateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VNet Gateway Tunnel Egress Bytes\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"TunnelEgressBytes\",\r\n \"metricNamespace\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"metricName\": \"TunnelEgressBytes\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#25": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VnetGw_TunnelEgressPacketDropCount_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VNetG Egress Packet Drop Count Alert\",\r\n \"description\": \"Policy to audit/deploy Vnet Gateway Egress Packet Drop Count Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"3\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\r\n \"equals\": \"VPN\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelEgressPacketDropCount\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/virtualNetworkGateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 4\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 4\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressPacketDropCountAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Vnet Gateway tunnel TunnelEgressPacketDropCount\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"TunnelEgressPacketDropCount\",\r\n \"metricNamespace\": \"microsoft.network/virtualNetworkGateways\",\r\n \"metricName\": \"TunnelEgressPacketDropCount\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#26": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VnetGw_TunnelEgressPacketDropMismatch_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VNetG Egress Packet Drop Mismatch Alert\",\r\n \"description\": \"Policy to audit/deploy Vnet Gateway Egress Packet Drop Mismatch Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"3\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\r\n \"equals\": \"VPN\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelEgressPacketDropTSMismatch\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/virtualNetworkGateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 4\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 4\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressPacketDropTSMismatchAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Vnet Gateway tunnel TunnelEgressPacketDropTSMismatch\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"TunnelEgressPacketDropTSMismatch\",\r\n \"metricNamespace\": \"microsoft.network/virtualNetworkGateways\",\r\n \"metricName\": \"TunnelEgressPacketDropTSMismatch\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#27": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VnetGw_TunnelIngress_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VNetG Tunnel Ingress Alert\",\r\n \"description\": \"Policy to audit/deploy Virtual Network Gateway Tunnel Ingress Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\r\n \"equals\": \"VPN\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelIngressBytes\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworkGateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VNet Gateway Tunnel ingress Bytes\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"TunnelIngressBytes\",\r\n \"metricNamespace\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"metricName\": \"TunnelIngressBytes\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#28": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VnetGw_TunnelIngressPacketDropCount_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VNetG Ingress Packet Drop Count Alert\",\r\n \"description\": \"Policy to audit/deploy Vnet Gateway Ingress Packet Drop Count Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"3\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\r\n \"equals\": \"VPN\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelIngressPacketDropCount\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/virtualNetworkGateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 4\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 4\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressPacketDropCountAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Vnet Gateway tunnel TunnelIngressPacketDropCount\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"TunnelIngressPacketDropCount\",\r\n \"metricNamespace\": \"microsoft.network/virtualNetworkGateways\",\r\n \"metricName\": \"TunnelIngressPacketDropCount\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#29": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VnetGw_TunnelIngressPacketDropMismatch_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VNetG Ingress Packet Drop Mismatch Alert\",\r\n \"description\": \"Policy to audit/deploy Vnet Gateway Ingress Packet Drop Mismatch Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"3\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\r\n \"equals\": \"VPN\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelIngressPacketDropTSMismatch\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/virtualNetworkGateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 4\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 4\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressPacketDropTSMismatchAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Vnet Gateway tunnel TunnelIngressPacketDropTSMismatch\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"TunnelIngressPacketDropTSMismatch\",\r\n \"metricNamespace\": \"microsoft.network/virtualNetworkGateways\",\r\n \"metricName\": \"TunnelIngressPacketDropTSMismatch\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#3": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERCIR_ArpAvailability_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ExpressRoute Circuits Arp Availability Alert\",\r\n \"description\": \"Policy to audit/deploy ExpressRoute Circuits Arp Availability Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ArpAvailability\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRouteCircuits/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-ArpAvailability')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ExpressRoute Circuit Arp Availability\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ArpAvailability\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRouteCircuits\",\r\n \"metricName\": \"ArpAvailability\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#30": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_VPNGateway_Delete\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Activity Log VPN Gateway Delete Alert\",\r\n \"description\": \"Policy to Deploy Activity Log VPN Gateway Delete Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.1.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/vpnGateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"existenceScope\": \"resourcegroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Administrative\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"operationName\"\r\n },\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Microsoft.Network/vpnGateways/delete\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ActivityVPNGatewayDelete\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ActivityVPNGatewayDelete\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Activity Log VPN Gateway Delete\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\"\r\n },\r\n {\r\n \"field\": \"operationName\",\r\n \"equals\": \"Microsoft.Network/vpnGateways/delete\"\r\n },\r\n {\r\n \"field\": \"status\",\r\n \"containsAny\": [\r\n \"succeeded\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#31": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VPNGw_BandwidthUtil_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VPNG Bandwidth Utilization Alert\",\r\n \"description\": \"Policy to audit/deploy VPN Gateway Bandwidth Utilization Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"tunnelaveragebandwidth\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayBandwidthAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VPN Gateway Bandwidth Utilization\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"tunnelaveragebandwidth\",\r\n \"metricNamespace\": \"microsoft.network/vpngateways\",\r\n \"metricName\": \"tunnelaveragebandwidth\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#32": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VPNGw_BGPPeerStatus_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VPNG BGP Peer Status Alert\",\r\n \"description\": \"Policy to audit/deploy VPN Gateway BGP Peer Status Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"bgppeerstatus\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Total\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-BGPPeerStatusAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VPN Gateway BGP peer status\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"bgppeerstatus\",\r\n \"metricNamespace\": \"microsoft.network/vpngateways\",\r\n \"metricName\": \"bgppeerstatus\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Total\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#33": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VPNGw_Egress_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VPNG Egress Alert\",\r\n \"description\": \"Policy to audit/deploy VPN Gateway Egress Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"tunnelegressbytes\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VPN Gateway tunnel egress bytes\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"tunnelegressbytes\",\r\n \"metricNamespace\": \"microsoft.network/vpngateways\",\r\n \"metricName\": \"tunnelegressbytes\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#34": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VPNGw_TunnelEgressPacketDropCount_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VPNG Egress Packet Drop Count Alert\",\r\n \"description\": \"Policy to audit/deploy VPN Gateway Egress Packet Drop Count Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"3\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelEgressPacketDropCount\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressPacketDropCountAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VPN Gateway tunnel TunnelEgressPacketDropCount\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"TunnelEgressPacketDropCount\",\r\n \"metricNamespace\": \"microsoft.network/vpngateways\",\r\n \"metricName\": \"TunnelEgressPacketDropCount\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#35": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VPNGw_TunnelEgressPacketDropMismatch_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VPNG Egress Packet Drop Mismatch Alert\",\r\n \"description\": \"Policy to audit/deploy VPN Gateway Egress Packet Drop Mismatch Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"3\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelEgressPacketDropTSMismatch\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressPacketDropTSMismatchAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VPN Gateway tunnel TunnelEgressPacketDropTSMismatch\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"TunnelEgressPacketDropTSMismatch\",\r\n \"metricNamespace\": \"microsoft.network/vpngateways\",\r\n \"metricName\": \"TunnelEgressPacketDropTSMismatch\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#36": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VPNGw_Ingress_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VPNG Ingress Alert\",\r\n \"description\": \"Policy to audit/deploy VPN Gateway Ingress Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"tunnelingressbytes\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VPN Gateway tunnel ingress bytes\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"tunnelingressbytes\",\r\n \"metricNamespace\": \"microsoft.network/vpngateways\",\r\n \"metricName\": \"tunnelingressbytes\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#37": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VPNGw_TunnelIngressPacketDropCount_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VPNG Ingress Packet Drop Count Alert\",\r\n \"description\": \"Policy to audit/deploy VPN Gateway Ingress Packet Drop Count Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"3\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelIngressPacketDropCount\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressPacketDropCountAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VPN Gateway tunnel TunnelIngressPacketDropCount\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"TunnelIngressPacketDropCount\",\r\n \"metricNamespace\": \"microsoft.network/vpngateways\",\r\n \"metricName\": \"TunnelIngressPacketDropCount\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#38": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VPNGw_TunnelIngressPacketDropMismatch_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VPNG Ingress Packet Drop Mismatch Alert\",\r\n \"description\": \"Policy to audit/deploy VPN Gateway Ingress Packet Drop Mismatch Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"3\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"microsoft.network/vpngateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"TunnelIngressPacketDropTSMismatch\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressPacketDropTSMismatchAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VPN Gateway tunnel TunnelIngressPacketDropTSMismatch\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"TunnelIngressPacketDropTSMismatch\",\r\n \"metricNamespace\": \"microsoft.network/vpngateways\",\r\n \"metricName\": \"TunnelIngressPacketDropTSMismatch\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#39": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AG_ApplicationGatewayTotalTime_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AGW ApplicationGatewayTotalTime Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Application Gateway ApplicationGatewayTotalTime Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"alertSensitivity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert Sensitivity\",\r\n \"description\": \"Alert Sensitivity for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"Low\",\r\n \"Medium\",\r\n \"High\"\r\n ],\r\n \"defaultValue\": \"Medium\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/applicationgateways/sku.name\",\r\n \"In\": [\r\n \"Standard_v2\",\r\n \"WAF_v2\"\r\n ]\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ApplicationGatewayTotalTime\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"alertSensitivity\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-agApplicationGatewayTotalTime')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Gateway ApplicationGatewayTotalTime\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ApplicationGatewayTotalTime\",\r\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\r\n \"metricName\": \"ApplicationGatewayTotalTime\",\r\n \"operator\": \"GreaterThan\",\r\n \"alertSensitivity\": \"[[parameters('alertSensitivity')]\",\r\n \"failingPeriods\": {\r\n \"minFailingPeriodsToAlert\": 2,\r\n \"numberOfEvaluationPeriods\": 2\r\n },\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"alertSensitivity\": {\r\n \"value\": \"[[parameters('alertSensitivity')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"alertSensitivity\": {\r\n \"value\": \"[[parameters('alertSensitivity')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#4": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERCIR_BgpAvailability_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ExpressRoute Circuits Bgp Availability Alert\",\r\n \"description\": \"Policy to audit/deploy ExpressRoute Circuits Bgp Availability Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"BgpAvailability\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRouteCircuits/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-BgpAvailability')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ExpressRoute Circuit Bgp Availability\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"BgpAvailability\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRouteCircuits\",\r\n \"metricName\": \"BgpAvailability\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#40": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AG_BackendLastByteResponseTime_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AGW BackendLastByteResponseTime Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Application Gateway BackendLastByteResponseTime Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"alertSensitivity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert Sensitivity\",\r\n \"description\": \"Alert Sensitivity for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"Low\",\r\n \"Medium\",\r\n \"High\"\r\n ],\r\n \"defaultValue\": \"Medium\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/applicationgateways/sku.name\",\r\n \"In\": [\r\n \"Standard_v2\",\r\n \"WAF_v2\"\r\n ]\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"BackendLastByteResponseTime\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"alertSensitivity\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-agBackendLastByteResponseTime')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Gateway BackendLastByteResponseTime\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"BackendLastByteResponseTime\",\r\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\r\n \"metricName\": \"BackendLastByteResponseTime\",\r\n \"operator\": \"GreaterThan\",\r\n \"alertSensitivity\": \"[[parameters('alertSensitivity')]\",\r\n \"failingPeriods\": {\r\n \"minFailingPeriodsToAlert\": 2,\r\n \"numberOfEvaluationPeriods\": 2\r\n },\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"alertSensitivity\": {\r\n \"value\": \"[[parameters('alertSensitivity')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"alertSensitivity\": {\r\n \"value\": \"[[parameters('alertSensitivity')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#41": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AG_CapacityUnits_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AGW Capacity Units Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Application Gateway CapacityUnits Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"75\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/applicationgateways/sku.name\",\r\n \"In\": [\r\n \"Standard_v2\",\r\n \"WAF_v2\"\r\n ]\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"CapacityUnits\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-agCapacityUnits')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Gateway Capacity Units\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"CapacityUnits\",\r\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\r\n \"metricName\": \"CapacityUnits\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#42": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AG_ComputeUnits_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AGW Compute Units Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Application Gateway ComputeUnits Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"75\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/applicationgateways/sku.name\",\r\n \"In\": [\r\n \"Standard_v2\",\r\n \"WAF_v2\"\r\n ]\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ComputeUnits\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/Microsoft.Network/applicationgateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-agComputeUnits')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Gateway Compute Units\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ComputeUnits\",\r\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\r\n \"metricName\": \"ComputeUnits\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#43": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AG_CPUUtilization_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AGW CPU Utilization Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Application Gateway CPU Utilization Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"80\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/applicationgateways/sku.name\",\r\n \"notIn\": [\r\n \"Standard_v2\",\r\n \"WAF_v2\"\r\n ]\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"CpuUtilization\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-agCpuUtilization')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Gateway CPU Utilization\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"CpuUtilization\",\r\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\r\n \"metricName\": \"CpuUtilization\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#44": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AG_FailedRequests_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AGW FailedRequests Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Application Gateway FailedRequests Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"FailedRequests\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Total\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-agFailedRequests')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Gateway FailedRequests\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"FailedRequests\",\r\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\r\n \"metricName\": \"FailedRequests\",\r\n \"operator\": \"GreaterThan\",\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"minFailingPeriodsToAlert\": 2,\r\n \"numberOfEvaluationPeriods\": 2\r\n },\r\n \"timeAggregation\": \"Total\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#45": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AG_ResponseStatus_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AGW ResponseStatus Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Application Gateway ResponseStatus Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"alertSensitivity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert Sensitivity\",\r\n \"description\": \"Alert Sensitivity for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"Low\",\r\n \"Medium\",\r\n \"High\"\r\n ],\r\n \"defaultValue\": \"Medium\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ResponseStatus\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Total\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"alertSensitivity\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-agResponseStatus')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Gateway ResponseStatus\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ResponseStatus\",\r\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\r\n \"metricName\": \"ResponseStatus\",\r\n \"operator\": \"GreaterThan\",\r\n \"alertSensitivity\": \"[[parameters('alertSensitivity')]\",\r\n \"failingPeriods\": {\r\n \"minFailingPeriodsToAlert\": 2,\r\n \"numberOfEvaluationPeriods\": 2\r\n },\r\n \"timeAggregation\": \"Total\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"HttpStatusGroup\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"4xx\",\r\n \"5xx\"\r\n ]\r\n }\r\n ],\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"alertSensitivity\": {\r\n \"value\": \"[[parameters('alertSensitivity')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"alertSensitivity\": {\r\n \"value\": \"[[parameters('alertSensitivity')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#46": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AG_UnhealthyHostCount_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AGW Unhealthy Host Count Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Application Gateway Unhealthy Host Count Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"20\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/applicationgateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"UnhealthyHostCount\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-agUnhealthyHostCount')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Gateway Unhealthy Host Count\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"CpuUtilization\",\r\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\r\n \"metricName\": \"UnhealthyHostCount\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#47": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_TM_EndpointHealth_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Traffic Manager Endpoint Health Alert\",\r\n \"description\": \"Policy to audit/deploy FTraffic Manager Endpoint Health Health Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"0.9\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/trafficmanagerprofiles\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/trafficmanagerprofiles\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ProbeAgentCurrentEndpointStateByProfileResourceId\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/trafficmanagerprofiles/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-EndpointHealthAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Traffic Manager Endpoint Health\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"EndpointHealth\",\r\n \"metricNamespace\": \"Microsoft.Network/trafficmanagerprofiles\",\r\n \"metricName\": \"ProbeAgentCurrentEndpointStateByProfileResourceId\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"EndpointName\",\r\n \"operator\": \"Include\",\r\n \"values\": [\r\n \"*\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#48": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_FD_BackendHealth_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Frontdoor Backend Health Percentage Alert\",\r\n \"description\": \"Policy to audit/deploy FrontDoor Backend Health Percentage Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.1.1\",\r\n \"category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/frontdoors\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/frontdoors\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"BackendHealthPercentage\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/frontdoors/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-BackendHealthPercentage')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Frontdoor Backend Health Percentage\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"BackendHealthPercentage\",\r\n \"metricNamespace\": \"Microsoft.Network/frontdoors\",\r\n \"metricName\": \"BackendHealthPercentage\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#49": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_FD_BackendRequestLatency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Frontdoor Backend Request Latency Alert\",\r\n \"description\": \"Policy to audit/deploy Frontdoor Backend Request Latency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/frontdoors\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/frontdoors\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"BackendRequestLatency\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/frontdoors/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-BackendRequestLatencyAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Frontdoor BackendRequestLatency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 2,\r\n \"minFailingPeriodsToAlert\": 2\r\n },\r\n \"name\": \"ServiceApiResult\",\r\n \"metricNamespace\": \"Microsoft.Network/frontdoors\",\r\n \"metricName\": \"BackendRequestLatency\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#5": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERCIR_QosDropBitsInPerSecond_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ExpressRoute Circuits QosDropBitsInPerSecond Alert\",\r\n \"description\": \"Policy to audit/deploy ExpressRoute Circuits QosDropBitsInPerSecond Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"QosDropBitsInPerSecond\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRouteCircuits/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-QosDropBitsInPerSecond')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ExpressRoute Circuit QosDropBitsInPerSecond\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"QosDropBitsInPerSecond\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRouteCircuits\",\r\n \"metricName\": \"QosDropBitsInPerSecond\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#50": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_FrontDoorCDN_OriginHealthPercentage_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy FrontDoor CDN Profile Origin Health Percentage Alert\",\r\n \"description\": \"Policy to audit/deploy FrontDoor Origin Health Percentage Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Cdn/profiles\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Cdn/profiles\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"OriginHealthPercentage\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Cdn/profiles/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-OriginHealthPercentage')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Frontdoor Origin Health Percentage\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"OriginHealthPercentage\",\r\n \"metricNamespace\": \"Microsoft.Cdn/profiles\",\r\n \"metricName\": \"OriginHealthPercentage\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#51": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_FrontDoorCDN_OriginLatency_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy FrontDoor CDN Profile Origin Latency Alert\",\r\n \"description\": \"Policy to audit/deploy FrontDoor CDN Profile Origin Latency Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Cdn/profiles\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Cdn/profiles\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"OriginLatency\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Cdn/profiles/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-OriginLatencyAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Frontdoor CDN Origin Latency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 2,\r\n \"minFailingPeriodsToAlert\": 2\r\n },\r\n \"name\": \"ServiceApiResult\",\r\n \"metricNamespace\": \"Microsoft.Cdn/profiles\",\r\n \"metricName\": \"OriginLatency\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#52": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_FrontDoorCDN_Percentage4XX_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy FrontDoor CDN Profile Percentage4XX Alert\",\r\n \"description\": \"Policy to audit/deploy FrontDoor CDN Profile Percentage4XX Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Cdn/profiles\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Cdn/profiles\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"Percentage4XX\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Cdn/profiles/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-Percentage4XXAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Frontdoor CDN Origin Latency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 2,\r\n \"minFailingPeriodsToAlert\": 2\r\n },\r\n \"name\": \"ServiceApiResult\",\r\n \"metricNamespace\": \"Microsoft.Cdn/profiles\",\r\n \"metricName\": \"Percentage4XX\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#53": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_FrontDoorCDN_Percentage5XX_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy FrontDoor CDN Profile Percentage5XX Alert\",\r\n \"description\": \"Policy to audit/deploy FrontDoor CDN Profile Percentage5XX Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Cdn/profiles\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Cdn/profiles\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"Percentage5XX\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Cdn/profiles/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-Percentage5XXAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Frontdoor CDN Origin Latency\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 2,\r\n \"minFailingPeriodsToAlert\": 2\r\n },\r\n \"name\": \"ServiceApiResult\",\r\n \"metricNamespace\": \"Microsoft.Cdn/profiles\",\r\n \"metricName\": \"Percentage5XX\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#54": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ALB_DataPathAvailability_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ALB Data Path Availability Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Load Balancer Data Path Availability Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/loadBalancers\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/loadBalancers/sku.name\",\r\n \"in\": [\r\n \"Standard\",\r\n \"Gateway\"\r\n ]\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/loadBalancers\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"VipAvailability\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-ALBDataPathAvailability')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ALB Data Path Availability\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"VipAvailability\",\r\n \"metricNamespace\": \"Microsoft.Network/loadBalancers\",\r\n \"metricName\": \"VipAvailability\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#55": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ALB_GlobalBackendAvailability_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ALB Global Backend Availability Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Load Balancer Global Backend Availability Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/loadBalancers\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/loadBalancers/sku.tier\",\r\n \"equals\": \"Global\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/loadBalancers\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"GlobalBackendAvailability\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-ALBGlobalBackendAvailability')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Global Backend Availability\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"GlobalBackendAvailability\",\r\n \"metricNamespace\": \"Microsoft.Network/loadBalancers\",\r\n \"metricName\": \"GlobalBackendAvailability\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#56": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ALB_HealthProbeStatus_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ALB Health Probe Status Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Load Balancer Health Probe Status Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/loadBalancers\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/loadBalancers/sku.name\",\r\n \"in\": [\r\n \"Standard\",\r\n \"Gateway\"\r\n ]\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/loadBalancers/sku.tier\",\r\n \"equals\": \"Regional\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/loadBalancers\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"DipAvailability\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-ALBHealthProbeStatus')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ALB Health Probe Status\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"DipAvailability\",\r\n \"metricNamespace\": \"Microsoft.Network/loadBalancers\",\r\n \"metricName\": \"DipAvailability\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#57": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ALB_UsedSNATPorts_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ALB Used SNAT Ports Alert\",\r\n \"description\": \"Policy to audit/deploy Azure Load Balancer Used SNAT Ports Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Networking\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"900\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/loadBalancers\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/loadBalancers\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"UsedSNATPorts\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-ALBUsedSNATPorts')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ALB Used SNAT Ports\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"UsedSNATPorts\",\r\n \"metricNamespace\": \"Microsoft.Network/loadBalancers\",\r\n \"metricName\": \"UsedSNATPorts\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#58": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_PublicIp_BytesInDDoSAttack_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy PIP Bytes in DDoS Attack Alert\",\r\n \"description\": \"Policy to audit/deploy PIP Bytes in DDoS Attack Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"4\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"8000000\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"bytesinddos\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Maximum\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-BytesInDDOSAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Public IP Address Bytes IN DDOS\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"bytesinddos\",\r\n \"metricNamespace\": \"Microsoft.Network/publicIPAddresses\",\r\n \"metricName\": \"bytesinddos\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#59": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_PublicIp_DDoSAttack_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy PIP DDoS Attack Alert\",\r\n \"description\": \"Policy to audit/deploy PIP DDoS Attack Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"0\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ifunderddosattack\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Maximum\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DDOS_Attack')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Public IP Address Under Attack\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ifunderddosattack\",\r\n \"metricNamespace\": \"Microsoft.Network/publicIPAddresses\",\r\n \"metricName\": \"ifunderddosattack\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#6": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERCIR_QosDropBitsOutPerSecond_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ExpressRoute Circuits QosDropBitsOutPerSecond Alert\",\r\n \"description\": \"Policy to audit/deploy ExpressRoute Circuits QosDropBitsOutPerSecond Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"QosDropBitsOutPerSecond\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRouteCircuits/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-QosDropBitsOutPerSecond')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ExpressRoute Circuit QosDropBitsOutPerSecond\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\": 4\r\n },\r\n \"name\": \"QosDropBitsOutPerSecond\",\r\n \"metricNamespace\": \"Microsoft.Network/expressRouteCircuits\",\r\n \"metricName\": \"QosDropBitsOutPerSecond\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#60": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_PublicIp_PacketsInDDoSAttack_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy PIP Packets in DDoS Attack Alert\",\r\n \"description\": \"Policy to audit/deploy PIP Packets in DDoS Attack Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"4\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"40000\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"PacketsInDDoS\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Total\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\r\n \"equals\": \"GreaterThanOrEqual\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-PacketsInDDosAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Public IP Address Packets IN DDOS\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"PacketsInDDoS\",\r\n \"metricNamespace\": \"Microsoft.Network/publicIPAddresses\",\r\n \"metricName\": \"PacketsInDDoS\",\r\n \"operator\": \"GreaterThanOrEqual\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Total\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#61": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_PublicIp_VIPAvailability_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy PIP VIP Availability Alert\",\r\n \"description\": \"Policy to audit/deploy PIP VIP Availability Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Network/publicIPAddresses/sku.name\",\r\n \"equals\": \"Standard\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"VipAvailability\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-VIPAvailabityAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Public IP Address VIP Availability\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"VipAvailability\",\r\n \"metricNamespace\": \"Microsoft.Network/publicIPAddresses\",\r\n \"metricName\": \"VipAvailability\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#62": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_VNET_DDoSAttack_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy VNet DDoS Attack Alert\",\r\n \"description\": \"Policy to audit/deploy Virtual Network DDoS Attack Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"0\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/virtualNetworks\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/virtualNetworks\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ifunderddosattack\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworks/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Maximum\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DDOSAttackAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for VNet DDOS Attack\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ifunderddosattack\",\r\n \"metricNamespace\": \"Microsoft.Network/virtualNetworks\",\r\n \"metricName\": \"ifunderddosattack\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#63": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_RouteTable_Update\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Activity Log Route Table Update Alert\",\r\n \"description\": \"Policy to Deploy Activity Log Route Table Update Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.1.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/routeTables\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"name\": \"ActivityUDRUpdate\",\r\n \"existenceScope\": \"resourcegroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Administrative\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"operationName\"\r\n },\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Microsoft.Network/routeTables/routes/write\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ActivityUDRUpdate\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ActivityUDRUpdate\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Activity Log Route table update\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\"\r\n },\r\n {\r\n \"field\": \"operationName\",\r\n \"equals\": \"Microsoft.Network/routeTables/routes/write\"\r\n },\r\n {\r\n \"field\": \"status\",\r\n \"containsAny\": [\r\n \"succeeded\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#64": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_NSG_Delete\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Activity Log NSG Delete Alert\",\r\n \"description\": \"Policy to Deploy Activity Log NSG Delete Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.1.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"Project\": \"amba-monitoring\"\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/networkSecurityGroups\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"name\": \"ActivityNSGDelete\",\r\n \"existenceScope\": \"resourcegroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Administrative\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"operationName\"\r\n },\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Microsoft.Network/networkSecurityGroups/delete\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ActivityNSGDelete\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ActivityNSGDelete\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Activity Log NSG Delete\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\"\r\n },\r\n {\r\n \"field\": \"operationName\",\r\n \"equals\": \"Microsoft.Network/networkSecurityGroups/delete\"\r\n },\r\n {\r\n \"field\": \"status\",\r\n \"containsAny\": [\r\n \"succeeded\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_Firewall_Delete\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Activity Log Azure FireWall Delete Alert\",\n \"description\": \"Policy to Deploy Activity Log Azure Firewall Delete Alert\",\n \"metadata\": {\n \"version\": \"1.1.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/azureFirewalls\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"name\": \"ActivityAzureFirewallDelete\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Administrative\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"operationName\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Microsoft.Network/azureFirewalls/delete\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActivityAzureFirewallDelete\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ActivityAzureFirewallDelete\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Activity Log Firewall Delete\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"Administrative\"\n },\n {\n \"field\": \"operationName\",\n \"equals\": \"Microsoft.Network/azurefirewalls/delete\"\n },\n {\n \"field\": \"status\",\n \"containsAny\": [\n \"succeeded\"\n ]\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#1": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AFW_FirewallHealth_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AFW FirewallHealth Alert\",\n \"description\": \"Policy to audit/deploy Azure Firewall FirewallHealth Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/azureFirewalls\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/azureFirewalls\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"FirewallHealth\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/azureFirewalls/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-FirewallHealth')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for AFW FirewallHealth\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"FirewallHealth\",\n \"metricNamespace\": \"Microsoft.Network/azureFirewalls\",\n \"metricName\": \"FirewallHealth\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#10": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERP_ExpressRouteBitsIn_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ER Direct ExpressRoute Bits In Alert\",\n \"description\": \"Policy to audit/deploy ER Direct Connection BitsInPerSecond Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"PortBitsInPerSecond\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERBitsInAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ER Direct Connection BitsInPerSecond\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"PortBitsInPerSecond\",\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\n \"metricName\": \"PortBitsInPerSecond\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#11": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERP_ExpressRouteBitsOut_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ER Direct ExpressRoute Bits Out Alert\",\n \"description\": \"Policy to audit/deploy ER Direct Connection BitsOutPerSecond Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"PortBitsOutPerSecond\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERBitsOutAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ER Direct Connection BitsOutPerSecond\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"PortBitsOutPerSecond\",\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\n \"metricName\": \"PortBitsOutPerSecond\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#12": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERP_ExpressRoutLineProtocol_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ER Direct ExpressRoute LineProtocol Alert\",\n \"description\": \"Policy to audit/deploy ER Direct LineProtocol Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"0.9\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"LineProtocol\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERLineProtocolAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ER Direct Connection LineProtocolPerSecond\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"LineProtocol\",\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\n \"metricName\": \"LineProtocol\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#13": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERP_ExpressRoutRxLightLevel_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ER Direct ExpressRoute RxLightLevel High Alert\",\n \"description\": \"Policy to audit/deploy ER Direct RxLightLevel High Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"0\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"RxLightLevel\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERRxLightLevelHighAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ER Direct Connection RxLightLevelHigh\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"RxLightLevel\",\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\n \"metricName\": \"RxLightLevel\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#14": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERP_ExpressRoutRxLightLevellow_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ER Direct ExpressRoute RxLightLevel Low Alert\",\n \"description\": \"Policy to audit/deploy ER Direct RxLightLevel Low Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"-10\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"RxLightLevel\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERRxLightLevelLowAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ER Direct Connection RxLightLevelLow\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"RxLightLevel\",\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\n \"metricName\": \"RxLightLevel\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#15": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERP_ExpressRoutTxLightLevell_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ER Direct ExpressRoute TxLightLevel High Alert\",\n \"description\": \"Policy to audit/deploy ER Direct TxLightLevel High Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"0\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TxLightLevel\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERTxLightLevelHighAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ER Direct Connection TxLightLevelHigh\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"TxLightLevel\",\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\n \"metricName\": \"TxLightLevel\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#16": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERP_ExpressRoutTxLightLevellow_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ER Direct ExpressRoute TxLightLevel Low Alert\",\n \"description\": \"Policy to audit/deploy ER Direct TxLightLevel Low Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"-10\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRoutePorts\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TxLightLevel\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRoutePorts/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-DirectERTxLightLevelLowAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ER Direct Connection TxLightLevelLow\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"TxLightLevel\",\n \"metricNamespace\": \"Microsoft.Network/expressRoutePorts\",\n \"metricName\": \"TxLightLevel\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#17": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_PDNSZ_CapacityUtil_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy PDNSZ Capacity Utilization Alert\",\n \"description\": \"Policy to audit/deploy Private DNS Zone Capacity Utilization Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT1H\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1H\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"80\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/privateDnsZones\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/privateDnsZones\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"VirtualNetworkLinkCapacityUtilization\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/privateDnsZones/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Maximum\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThanOrEqual\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-CapacityUtilizationAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Private DNS Zone Virtual Network Link Capacity Utilization\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"VirtualNetworkLinkCapacityUtilization\",\n \"metricNamespace\": \"Microsoft.Network/privateDnsZones\",\n \"metricName\": \"VirtualNetworkLinkCapacityUtilization\",\n \"operator\": \"GreaterThanOrEqual\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Maximum\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#18": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_PDNSZ_QueryVolume_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy PDNSZ Query Volume Alert\",\n \"description\": \"Policy to audit/deploy Private DNS Zone Query Volume Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"4\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT1H\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1H\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"500\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/privateDnsZones\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/privateDnsZones\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"QueryVolume\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/privateDnsZones/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Total\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThanOrEqual\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-QueryVolumeAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Private DNS Query Volume\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"QueryVolume\",\n \"metricNamespace\": \"Microsoft.Network/privateDnsZones\",\n \"metricName\": \"QueryVolume\",\n \"operator\": \"GreaterThanOrEqual\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Total\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#19": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_PDNSZ_RecordSetCapacity_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy PDNSZ Record Set Capacity Alert\",\n \"description\": \"Policy to audit/deploy Private DNS Zone Record Set Capacity Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT1H\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1H\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"80\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/privateDnsZones\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/privateDnsZones\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"RecordSetCapacityUtilization\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/privateDnsZones/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Maximum\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThanOrEqual\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-RecordSet_Capacity_Utilization')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Private DNS Zone Record Set Capacity Utilization\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"RecordSetCapacityUtilization\",\n \"metricNamespace\": \"Microsoft.Network/privateDnsZones\",\n \"metricName\": \"RecordSetCapacityUtilization\",\n \"operator\": \"GreaterThanOrEqual\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Maximum\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#2": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AFW_SNATPortUtilization_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AFW SNATPortUtilization Alert\",\n \"description\": \"Policy to audit/deploy Azure Firewall SNATPortUtilization Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"80\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/azureFirewalls\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/azureFirewalls\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"SNATPortUtilization\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/azureFirewalls/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-SNATPortUtilization')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for AFW SNATPortUtilization\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"SNATPortUtilization\",\n \"metricNamespace\": \"Microsoft.Network/azureFirewalls\",\n \"metricName\": \"SNATPortUtilization\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#20": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_DNSZ_RegistrationCapacityUtil_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy PDNSZ Registration Capacity Utilization Alert\",\n \"description\": \"Policy to audit/deploy Private DNS Zone Registration Capacity Utilization Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT1H\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1H\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"80\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/privateDnsZones\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/privateDnsZones\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"VirtualNetworkWithRegistrationCapacityUtilization\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/privateDnsZones/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Maximum\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThanOrEqual\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-RequestsAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Private DNS Zone Registration Capacity Utilization\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"VirtualNetworkWithRegistrationCapacityUtilization\",\n \"metricNamespace\": \"Microsoft.Network/privateDnsZones\",\n \"metricName\": \"VirtualNetworkWithRegistrationCapacityUtilization\",\n \"operator\": \"GreaterThanOrEqual\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Maximum\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#21": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VnetGw_ExpressRouteBitsPerSecond_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VNetG ExpressRoute Bits Per Second Alert\",\n \"description\": \"Policy to audit/deploy Virtual Network Gateway Express Route Bits Per Second Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\n \"equals\": \"ExpressRoute\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ExpressRouteGatewayBitsPerSecond\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworkGateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayERBitsAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VNet Gateway Express Route Bits Per Second\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ExpressRouteGatewayBitsPerSecond\",\n \"metricNamespace\": \"Microsoft.Network/virtualNetworkGateways\",\n \"metricName\": \"ExpressRouteGatewayBitsPerSecond\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#22": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VnetGw_ExpressRouteCpuUtil_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VNetG ExpressRoute CPU Utilization Alert\",\n \"description\": \"Policy to audit/deploy Virtual Network Gateway Express Route CPU Utilization Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"80\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\n \"equals\": \"ExpressRoute\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ExpressRouteGatewayCpuUtilization\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworkGateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayERCPUAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VNet Gateway Express Route CPU Utilization\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ExpressRouteGatewayCpuUtilization\",\n \"metricNamespace\": \"Microsoft.Network/virtualNetworkGateways\",\n \"metricName\": \"ExpressRouteGatewayCpuUtilization\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#23": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VnetGw_TunnelBandwidth_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VNetG Tunnel Bandwidth Alert\",\n \"description\": \"Policy to audit/deploy Virtual Network Gateway Tunnel Bandwidth Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\n \"equals\": \"VPN\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelAverageBandwidth\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworkGateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelBandwidthAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VNet Gateway Tunnel Avg Bandwidth\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"TunnelAverageBandwidth\",\n \"metricNamespace\": \"Microsoft.Network/virtualNetworkGateways\",\n \"metricName\": \"TunnelAverageBandwidth\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#24": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VnetGw_TunnelEgress_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VNetG Tunnel Egress Alert\",\n \"description\": \"Policy to audit/deploy Virtual Network Gateway Tunnel Egress Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\n \"equals\": \"VPN\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelEgressBytes\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworkGateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VNet Gateway Tunnel Egress Bytes\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"TunnelEgressBytes\",\n \"metricNamespace\": \"Microsoft.Network/virtualNetworkGateways\",\n \"metricName\": \"TunnelEgressBytes\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#25": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VnetGw_TunnelEgressPacketDropCount_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VNetG Egress Packet Drop Count Alert\",\n \"description\": \"Policy to audit/deploy Vnet Gateway Egress Packet Drop Count Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"3\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\n \"equals\": \"VPN\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelEgressPacketDropCount\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/virtualNetworkGateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 4\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 4\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressPacketDropCountAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Vnet Gateway tunnel TunnelEgressPacketDropCount\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"TunnelEgressPacketDropCount\",\n \"metricNamespace\": \"microsoft.network/virtualNetworkGateways\",\n \"metricName\": \"TunnelEgressPacketDropCount\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#26": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VnetGw_TunnelEgressPacketDropMismatch_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VNetG Egress Packet Drop Mismatch Alert\",\n \"description\": \"Policy to audit/deploy Vnet Gateway Egress Packet Drop Mismatch Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"3\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\n \"equals\": \"VPN\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelEgressPacketDropTSMismatch\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/virtualNetworkGateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 4\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 4\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressPacketDropTSMismatchAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Vnet Gateway tunnel TunnelEgressPacketDropTSMismatch\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"TunnelEgressPacketDropTSMismatch\",\n \"metricNamespace\": \"microsoft.network/virtualNetworkGateways\",\n \"metricName\": \"TunnelEgressPacketDropTSMismatch\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#27": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VnetGw_TunnelIngress_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VNetG Tunnel Ingress Alert\",\n \"description\": \"Policy to audit/deploy Virtual Network Gateway Tunnel Ingress Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\n \"equals\": \"VPN\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelIngressBytes\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworkGateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VNet Gateway Tunnel ingress Bytes\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"TunnelIngressBytes\",\n \"metricNamespace\": \"Microsoft.Network/virtualNetworkGateways\",\n \"metricName\": \"TunnelIngressBytes\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#28": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VnetGw_TunnelIngressPacketDropCount_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VNetG Ingress Packet Drop Count Alert\",\n \"description\": \"Policy to audit/deploy Vnet Gateway Ingress Packet Drop Count Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"3\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\n \"equals\": \"VPN\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelIngressPacketDropCount\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/virtualNetworkGateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 4\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 4\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressPacketDropCountAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Vnet Gateway tunnel TunnelIngressPacketDropCount\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"TunnelIngressPacketDropCount\",\n \"metricNamespace\": \"microsoft.network/virtualNetworkGateways\",\n \"metricName\": \"TunnelIngressPacketDropCount\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#29": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VnetGw_TunnelIngressPacketDropMismatch_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VNetG Ingress Packet Drop Mismatch Alert\",\n \"description\": \"Policy to audit/deploy Vnet Gateway Ingress Packet Drop Mismatch Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"3\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Network/virtualNetworkGateways/gatewayType\",\n \"equals\": \"VPN\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/virtualNetworkGateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelIngressPacketDropTSMismatch\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/virtualNetworkGateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 4\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 4\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressPacketDropTSMismatchAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Vnet Gateway tunnel TunnelIngressPacketDropTSMismatch\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"TunnelIngressPacketDropTSMismatch\",\n \"metricNamespace\": \"microsoft.network/virtualNetworkGateways\",\n \"metricName\": \"TunnelIngressPacketDropTSMismatch\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#3": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERCIR_ArpAvailability_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ExpressRoute Circuits Arp Availability Alert\",\n \"description\": \"Policy to audit/deploy ExpressRoute Circuits Arp Availability Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ArpAvailability\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRouteCircuits/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-ArpAvailability')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ExpressRoute Circuit Arp Availability\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ArpAvailability\",\n \"metricNamespace\": \"Microsoft.Network/expressRouteCircuits\",\n \"metricName\": \"ArpAvailability\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#30": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_VPNGateway_Delete\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Activity Log VPN Gateway Delete Alert\",\n \"description\": \"Policy to Deploy Activity Log VPN Gateway Delete Alert\",\n \"metadata\": {\n \"version\": \"1.1.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/vpnGateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"existenceScope\": \"resourcegroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Administrative\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"operationName\"\n },\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Microsoft.Network/vpnGateways/delete\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActivityVPNGatewayDelete\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ActivityVPNGatewayDelete\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Activity Log VPN Gateway Delete\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"Administrative\"\n },\n {\n \"field\": \"operationName\",\n \"equals\": \"Microsoft.Network/vpnGateways/delete\"\n },\n {\n \"field\": \"status\",\n \"containsAny\": [\n \"succeeded\"\n ]\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#31": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VPNGw_BandwidthUtil_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VPNG Bandwidth Utilization Alert\",\n \"description\": \"Policy to audit/deploy VPN Gateway Bandwidth Utilization Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"tunnelaveragebandwidth\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayBandwidthAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VPN Gateway Bandwidth Utilization\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"tunnelaveragebandwidth\",\n \"metricNamespace\": \"microsoft.network/vpngateways\",\n \"metricName\": \"tunnelaveragebandwidth\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#32": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VPNGw_BGPPeerStatus_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VPNG BGP Peer Status Alert\",\n \"description\": \"Policy to audit/deploy VPN Gateway BGP Peer Status Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"bgppeerstatus\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Total\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-BGPPeerStatusAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VPN Gateway BGP peer status\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"bgppeerstatus\",\n \"metricNamespace\": \"microsoft.network/vpngateways\",\n \"metricName\": \"bgppeerstatus\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Total\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#33": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VPNGw_Egress_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VPNG Egress Alert\",\n \"description\": \"Policy to audit/deploy VPN Gateway Egress Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"tunnelegressbytes\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VPN Gateway tunnel egress bytes\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"tunnelegressbytes\",\n \"metricNamespace\": \"microsoft.network/vpngateways\",\n \"metricName\": \"tunnelegressbytes\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#34": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VPNGw_TunnelEgressPacketDropCount_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VPNG Egress Packet Drop Count Alert\",\n \"description\": \"Policy to audit/deploy VPN Gateway Egress Packet Drop Count Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"3\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelEgressPacketDropCount\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressPacketDropCountAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VPN Gateway tunnel TunnelEgressPacketDropCount\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"TunnelEgressPacketDropCount\",\n \"metricNamespace\": \"microsoft.network/vpngateways\",\n \"metricName\": \"TunnelEgressPacketDropCount\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#35": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VPNGw_TunnelEgressPacketDropMismatch_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VPNG Egress Packet Drop Mismatch Alert\",\n \"description\": \"Policy to audit/deploy VPN Gateway Egress Packet Drop Mismatch Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"3\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelEgressPacketDropTSMismatch\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelEgressPacketDropTSMismatchAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VPN Gateway tunnel TunnelEgressPacketDropTSMismatch\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"TunnelEgressPacketDropTSMismatch\",\n \"metricNamespace\": \"microsoft.network/vpngateways\",\n \"metricName\": \"TunnelEgressPacketDropTSMismatch\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#36": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VPNGw_Ingress_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VPNG Ingress Alert\",\n \"description\": \"Policy to audit/deploy VPN Gateway Ingress Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"tunnelingressbytes\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VPN Gateway tunnel ingress bytes\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"tunnelingressbytes\",\n \"metricNamespace\": \"microsoft.network/vpngateways\",\n \"metricName\": \"tunnelingressbytes\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#37": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VPNGw_TunnelIngressPacketDropCount_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VPNG Ingress Packet Drop Count Alert\",\n \"description\": \"Policy to audit/deploy VPN Gateway Ingress Packet Drop Count Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"3\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelIngressPacketDropCount\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressPacketDropCountAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VPN Gateway tunnel TunnelIngressPacketDropCount\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"TunnelIngressPacketDropCount\",\n \"metricNamespace\": \"microsoft.network/vpngateways\",\n \"metricName\": \"TunnelIngressPacketDropCount\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#38": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VPNGw_TunnelIngressPacketDropMismatch_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VPNG Ingress Packet Drop Mismatch Alert\",\n \"description\": \"Policy to audit/deploy VPN Gateway Ingress Packet Drop Mismatch Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"3\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"microsoft.network/vpngateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"TunnelIngressPacketDropTSMismatch\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.network/vpngateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-TunnelIngressPacketDropTSMismatchAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VPN Gateway tunnel TunnelIngressPacketDropTSMismatch\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"TunnelIngressPacketDropTSMismatch\",\n \"metricNamespace\": \"microsoft.network/vpngateways\",\n \"metricName\": \"TunnelIngressPacketDropTSMismatch\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#39": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AG_ApplicationGatewayTotalTime_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AGW ApplicationGatewayTotalTime Alert\",\n \"description\": \"Policy to audit/deploy Azure Application Gateway ApplicationGatewayTotalTime Alert\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"alertSensitivity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert Sensitivity\",\n \"description\": \"Alert Sensitivity for the alert\"\n },\n \"allowedValues\": [\n \"Low\",\n \"Medium\",\n \"High\"\n ],\n \"defaultValue\": \"Medium\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Network/applicationgateways/sku.name\",\n \"In\": [\n \"Standard_v2\",\n \"WAF_v2\"\n ]\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ApplicationGatewayTotalTime\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"[[parameters('alertSensitivity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"alertSensitivity\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-agApplicationGatewayTotalTime')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Gateway ApplicationGatewayTotalTime\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ApplicationGatewayTotalTime\",\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\n \"metricName\": \"ApplicationGatewayTotalTime\",\n \"operator\": \"GreaterThan\",\n \"alertSensitivity\": \"[[parameters('alertSensitivity')]\",\n \"failingPeriods\": {\n \"minFailingPeriodsToAlert\": 2,\n \"numberOfEvaluationPeriods\": 2\n },\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"alertSensitivity\": {\n \"value\": \"[[parameters('alertSensitivity')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"alertSensitivity\": {\n \"value\": \"[[parameters('alertSensitivity')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#4": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERCIR_BgpAvailability_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ExpressRoute Circuits Bgp Availability Alert\",\n \"description\": \"Policy to audit/deploy ExpressRoute Circuits Bgp Availability Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"BgpAvailability\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRouteCircuits/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-BgpAvailability')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ExpressRoute Circuit Bgp Availability\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"BgpAvailability\",\n \"metricNamespace\": \"Microsoft.Network/expressRouteCircuits\",\n \"metricName\": \"BgpAvailability\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#40": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AG_BackendLastByteResponseTime_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AGW BackendLastByteResponseTime Alert\",\n \"description\": \"Policy to audit/deploy Azure Application Gateway BackendLastByteResponseTime Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"alertSensitivity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert Sensitivity\",\n \"description\": \"Alert Sensitivity for the alert\"\n },\n \"allowedValues\": [\n \"Low\",\n \"Medium\",\n \"High\"\n ],\n \"defaultValue\": \"Medium\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Network/applicationgateways/sku.name\",\n \"In\": [\n \"Standard_v2\",\n \"WAF_v2\"\n ]\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"BackendLastByteResponseTime\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"[[parameters('alertSensitivity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"alertSensitivity\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-agBackendLastByteResponseTime')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Gateway BackendLastByteResponseTime\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"BackendLastByteResponseTime\",\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\n \"metricName\": \"BackendLastByteResponseTime\",\n \"operator\": \"GreaterThan\",\n \"alertSensitivity\": \"[[parameters('alertSensitivity')]\",\n \"failingPeriods\": {\n \"minFailingPeriodsToAlert\": 2,\n \"numberOfEvaluationPeriods\": 2\n },\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"alertSensitivity\": {\n \"value\": \"[[parameters('alertSensitivity')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"alertSensitivity\": {\n \"value\": \"[[parameters('alertSensitivity')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#41": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AG_CapacityUnits_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AGW Capacity Units Alert\",\n \"description\": \"Policy to audit/deploy Azure Application Gateway CapacityUnits Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"75\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Network/applicationgateways/sku.name\",\n \"In\": [\n \"Standard_v2\",\n \"WAF_v2\"\n ]\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"CapacityUnits\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-agCapacityUnits')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Gateway Capacity Units\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"CapacityUnits\",\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\n \"metricName\": \"CapacityUnits\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#42": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AG_ComputeUnits_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AGW Compute Units Alert\",\n \"description\": \"Policy to audit/deploy Azure Application Gateway ComputeUnits Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"75\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Network/applicationgateways/sku.name\",\n \"In\": [\n \"Standard_v2\",\n \"WAF_v2\"\n ]\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ComputeUnits\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/Microsoft.Network/applicationgateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-agComputeUnits')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Gateway Compute Units\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ComputeUnits\",\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\n \"metricName\": \"ComputeUnits\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#43": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AG_CPUUtilization_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AGW CPU Utilization Alert\",\n \"description\": \"Policy to audit/deploy Azure Application Gateway CPU Utilization Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"80\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Network/applicationgateways/sku.name\",\n \"notIn\": [\n \"Standard_v2\",\n \"WAF_v2\"\n ]\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"CpuUtilization\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-agCpuUtilization')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Gateway CPU Utilization\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"CpuUtilization\",\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\n \"metricName\": \"CpuUtilization\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#44": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AG_FailedRequests_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AGW FailedRequests Alert\",\n \"description\": \"Policy to audit/deploy Azure Application Gateway FailedRequests Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"alertSensitivity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert Sensitivity\",\n \"description\": \"Alert Sensitivity for the alert\"\n },\n \"allowedValues\": [\n \"Low\",\n \"Medium\",\n \"High\"\n ],\n \"defaultValue\": \"Medium\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"FailedRequests\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Total\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"[[parameters('alertSensitivity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"alertSensitivity\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-agFailedRequests')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Gateway FailedRequests\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"FailedRequests\",\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\n \"metricName\": \"FailedRequests\",\n \"operator\": \"GreaterThan\",\n \"alertSensitivity\": \"[[parameters('alertSensitivity')]\",\n \"failingPeriods\": {\n \"minFailingPeriodsToAlert\": 2,\n \"numberOfEvaluationPeriods\": 2\n },\n \"timeAggregation\": \"Total\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"alertSensitivity\": {\n \"value\": \"[[parameters('alertSensitivity')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"alertSensitivity\": {\n \"value\": \"[[parameters('alertSensitivity')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#45": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AG_ResponseStatus_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AGW ResponseStatus Alert\",\n \"description\": \"Policy to audit/deploy Azure Application Gateway ResponseStatus Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"alertSensitivity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert Sensitivity\",\n \"description\": \"Alert Sensitivity for the alert\"\n },\n \"allowedValues\": [\n \"Low\",\n \"Medium\",\n \"High\"\n ],\n \"defaultValue\": \"Medium\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ResponseStatus\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/applicationgateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Total\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"[[parameters('alertSensitivity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"alertSensitivity\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-agResponseStatus')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Gateway ResponseStatus\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ResponseStatus\",\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\n \"metricName\": \"ResponseStatus\",\n \"operator\": \"GreaterThan\",\n \"alertSensitivity\": \"[[parameters('alertSensitivity')]\",\n \"failingPeriods\": {\n \"minFailingPeriodsToAlert\": 2,\n \"numberOfEvaluationPeriods\": 2\n },\n \"timeAggregation\": \"Total\",\n \"dimensions\": [\n {\n \"name\": \"HttpStatusGroup\",\n \"operator\": \"Include\",\n \"values\": [\n \"4xx\",\n \"5xx\"\n ]\n }\n ],\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"alertSensitivity\": {\n \"value\": \"[[parameters('alertSensitivity')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"alertSensitivity\": {\n \"value\": \"[[parameters('alertSensitivity')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#46": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AG_UnhealthyHostCount_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AGW Unhealthy Host Count Alert\",\n \"description\": \"Policy to audit/deploy Azure Application Gateway Unhealthy Host Count Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"20\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/applicationgateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"UnhealthyHostCount\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-agUnhealthyHostCount')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Gateway Unhealthy Host Count\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"CpuUtilization\",\n \"metricNamespace\": \"Microsoft.Network/applicationgateways\",\n \"metricName\": \"UnhealthyHostCount\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#47": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_TM_EndpointHealth_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Traffic Manager Endpoint Health Alert\",\n \"description\": \"Policy to audit/deploy FTraffic Manager Endpoint Health Health Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"0.9\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/trafficmanagerprofiles\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/trafficmanagerprofiles\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ProbeAgentCurrentEndpointStateByProfileResourceId\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/trafficmanagerprofiles/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-EndpointHealthAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Traffic Manager Endpoint Health\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"EndpointHealth\",\n \"metricNamespace\": \"Microsoft.Network/trafficmanagerprofiles\",\n \"metricName\": \"ProbeAgentCurrentEndpointStateByProfileResourceId\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\",\n \"dimensions\": [\n {\n \"name\": \"EndpointName\",\n \"operator\": \"Include\",\n \"values\": [\n \"*\"\n ]\n }\n ]\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#48": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_FD_BackendHealth_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Frontdoor Backend Health Percentage Alert\",\n \"description\": \"Policy to audit/deploy FrontDoor Backend Health Percentage Alert\",\n \"metadata\": {\n \"version\": \"1.1.1\",\n \"category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT15M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/frontdoors\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/frontdoors\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"BackendHealthPercentage\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/frontdoors/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-BackendHealthPercentage')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Frontdoor Backend Health Percentage\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"BackendHealthPercentage\",\n \"metricNamespace\": \"Microsoft.Network/frontdoors\",\n \"metricName\": \"BackendHealthPercentage\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#49": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_FD_BackendRequestLatency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Frontdoor Backend Request Latency Alert\",\n \"description\": \"Policy to audit/deploy Frontdoor Backend Request Latency Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/frontdoors\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/frontdoors\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"BackendRequestLatency\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/frontdoors/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-BackendRequestLatencyAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Frontdoor BackendRequestLatency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 2,\n \"minFailingPeriodsToAlert\": 2\n },\n \"name\": \"ServiceApiResult\",\n \"metricNamespace\": \"Microsoft.Network/frontdoors\",\n \"metricName\": \"BackendRequestLatency\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#5": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERCIR_QosDropBitsInPerSecond_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ExpressRoute Circuits QosDropBitsInPerSecond Alert\",\n \"description\": \"Policy to audit/deploy ExpressRoute Circuits QosDropBitsInPerSecond Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"QosDropBitsInPerSecond\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRouteCircuits/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-QosDropBitsInPerSecond')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ExpressRoute Circuit QosDropBitsInPerSecond\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"QosDropBitsInPerSecond\",\n \"metricNamespace\": \"Microsoft.Network/expressRouteCircuits\",\n \"metricName\": \"QosDropBitsInPerSecond\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#50": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_FrontDoorCDN_OriginHealthPercentage_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy FrontDoor CDN Profile Origin Health Percentage Alert\",\n \"description\": \"Policy to audit/deploy FrontDoor Origin Health Percentage Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Cdn/profiles\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Cdn/profiles\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"OriginHealthPercentage\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Cdn/profiles/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-OriginHealthPercentage')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Frontdoor Origin Health Percentage\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"OriginHealthPercentage\",\n \"metricNamespace\": \"Microsoft.Cdn/profiles\",\n \"metricName\": \"OriginHealthPercentage\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#51": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_FrontDoorCDN_OriginLatency_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy FrontDoor CDN Profile Origin Latency Alert\",\n \"description\": \"Policy to audit/deploy FrontDoor CDN Profile Origin Latency Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Cdn/profiles\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Cdn/profiles\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"OriginLatency\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Cdn/profiles/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-OriginLatencyAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Frontdoor CDN Origin Latency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 2,\n \"minFailingPeriodsToAlert\": 2\n },\n \"name\": \"ServiceApiResult\",\n \"metricNamespace\": \"Microsoft.Cdn/profiles\",\n \"metricName\": \"OriginLatency\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#52": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_FrontDoorCDN_Percentage4XX_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy FrontDoor CDN Profile Percentage4XX Alert\",\n \"description\": \"Policy to audit/deploy FrontDoor CDN Profile Percentage4XX Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Cdn/profiles\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Cdn/profiles\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"Percentage4XX\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Cdn/profiles/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-Percentage4XXAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Frontdoor CDN Origin Latency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 2,\n \"minFailingPeriodsToAlert\": 2\n },\n \"name\": \"ServiceApiResult\",\n \"metricNamespace\": \"Microsoft.Cdn/profiles\",\n \"metricName\": \"Percentage4XX\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#53": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_FrontDoorCDN_Percentage5XX_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy FrontDoor CDN Profile Percentage5XX Alert\",\n \"description\": \"Policy to audit/deploy FrontDoor CDN Profile Percentage5XX Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Cdn/profiles\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Cdn/profiles\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"Percentage5XX\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Cdn/profiles/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-Percentage5XXAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Frontdoor CDN Origin Latency\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 2,\n \"minFailingPeriodsToAlert\": 2\n },\n \"name\": \"ServiceApiResult\",\n \"metricNamespace\": \"Microsoft.Cdn/profiles\",\n \"metricName\": \"Percentage5XX\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#54": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ALB_DataPathAvailability_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ALB Data Path Availability Alert\",\n \"description\": \"Policy to audit/deploy Azure Load Balancer Data Path Availability Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/loadBalancers\"\n },\n {\n \"field\": \"Microsoft.Network/loadBalancers/sku.name\",\n \"in\": [\n \"Standard\",\n \"Gateway\"\n ]\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/loadBalancers\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"VipAvailability\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-ALBDataPathAvailability')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ALB Data Path Availability\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"VipAvailability\",\n \"metricNamespace\": \"Microsoft.Network/loadBalancers\",\n \"metricName\": \"VipAvailability\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#55": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ALB_GlobalBackendAvailability_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ALB Global Backend Availability Alert\",\n \"description\": \"Policy to audit/deploy Azure Load Balancer Global Backend Availability Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/loadBalancers\"\n },\n {\n \"field\": \"Microsoft.Network/loadBalancers/sku.tier\",\n \"equals\": \"Global\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/loadBalancers\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"GlobalBackendAvailability\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-ALBGlobalBackendAvailability')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Global Backend Availability\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"GlobalBackendAvailability\",\n \"metricNamespace\": \"Microsoft.Network/loadBalancers\",\n \"metricName\": \"GlobalBackendAvailability\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#56": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ALB_HealthProbeStatus_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ALB Health Probe Status Alert\",\n \"description\": \"Policy to audit/deploy Azure Load Balancer Health Probe Status Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/loadBalancers\"\n },\n {\n \"field\": \"Microsoft.Network/loadBalancers/sku.name\",\n \"in\": [\n \"Standard\",\n \"Gateway\"\n ]\n },\n {\n \"field\": \"Microsoft.Network/loadBalancers/sku.tier\",\n \"equals\": \"Regional\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/loadBalancers\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"DipAvailability\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-ALBHealthProbeStatus')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ALB Health Probe Status\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"DipAvailability\",\n \"metricNamespace\": \"Microsoft.Network/loadBalancers\",\n \"metricName\": \"DipAvailability\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#57": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ALB_UsedSNATPorts_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ALB Used SNAT Ports Alert\",\n \"description\": \"Policy to audit/deploy Azure Load Balancer Used SNAT Ports Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Networking\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"900\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/loadBalancers\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/loadBalancers\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"UsedSNATPorts\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-ALBUsedSNATPorts')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ALB Used SNAT Ports\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"UsedSNATPorts\",\n \"metricNamespace\": \"Microsoft.Network/loadBalancers\",\n \"metricName\": \"UsedSNATPorts\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#58": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_PublicIp_BytesInDDoSAttack_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy PIP Bytes in DDoS Attack Alert\",\n \"description\": \"Policy to audit/deploy PIP Bytes in DDoS Attack Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"4\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"8000000\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"bytesinddos\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Maximum\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-BytesInDDOSAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Public IP Address Bytes IN DDOS\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"bytesinddos\",\n \"metricNamespace\": \"Microsoft.Network/publicIPAddresses\",\n \"metricName\": \"bytesinddos\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Maximum\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#59": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_PublicIp_DDoSAttack_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy PIP DDoS Attack Alert\",\n \"description\": \"Policy to audit/deploy PIP DDoS Attack Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"0\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ifunderddosattack\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Maximum\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-DDOS_Attack')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Public IP Address Under Attack\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ifunderddosattack\",\n \"metricNamespace\": \"Microsoft.Network/publicIPAddresses\",\n \"metricName\": \"ifunderddosattack\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Maximum\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#6": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERCIR_QosDropBitsOutPerSecond_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ExpressRoute Circuits QosDropBitsOutPerSecond Alert\",\n \"description\": \"Policy to audit/deploy ExpressRoute Circuits QosDropBitsOutPerSecond Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressRouteCircuits\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"QosDropBitsOutPerSecond\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressRouteCircuits/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-QosDropBitsOutPerSecond')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ExpressRoute Circuit QosDropBitsOutPerSecond\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 4,\n \"minFailingPeriodsToAlert\": 4\n },\n \"name\": \"QosDropBitsOutPerSecond\",\n \"metricNamespace\": \"Microsoft.Network/expressRouteCircuits\",\n \"metricName\": \"QosDropBitsOutPerSecond\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#60": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_PublicIp_PacketsInDDoSAttack_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy PIP Packets in DDoS Attack Alert\",\n \"description\": \"Policy to audit/deploy PIP Packets in DDoS Attack Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"4\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"40000\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"PacketsInDDoS\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Total\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].operator\",\n \"equals\": \"GreaterThanOrEqual\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-PacketsInDDosAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Public IP Address Packets IN DDOS\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"PacketsInDDoS\",\n \"metricNamespace\": \"Microsoft.Network/publicIPAddresses\",\n \"metricName\": \"PacketsInDDoS\",\n \"operator\": \"GreaterThanOrEqual\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Total\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#61": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_PublicIp_VIPAvailability_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy PIP VIP Availability Alert\",\n \"description\": \"Policy to audit/deploy PIP VIP Availability Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\n },\n {\n \"field\": \"Microsoft.Network/publicIPAddresses/sku.name\",\n \"equals\": \"Standard\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/publicIPAddresses\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"VipAvailability\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-VIPAvailabityAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Public IP Address VIP Availability\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"VipAvailability\",\n \"metricNamespace\": \"Microsoft.Network/publicIPAddresses\",\n \"metricName\": \"VipAvailability\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#62": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_VNET_DDoSAttack_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy VNet DDoS Attack Alert\",\n \"description\": \"Policy to audit/deploy Virtual Network DDoS Attack Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"0\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/virtualNetworks\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/virtualNetworks\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ifunderddosattack\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworks/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Maximum\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-DDOSAttackAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for VNet DDOS Attack\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ifunderddosattack\",\n \"metricNamespace\": \"Microsoft.Network/virtualNetworks\",\n \"metricName\": \"ifunderddosattack\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Maximum\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#63": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_RouteTable_Update\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Activity Log Route Table Update Alert\",\n \"description\": \"Policy to Deploy Activity Log Route Table Update Alert\",\n \"metadata\": {\n \"version\": \"1.1.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/routeTables\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"name\": \"ActivityUDRUpdate\",\n \"existenceScope\": \"resourcegroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Administrative\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"operationName\"\n },\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Microsoft.Network/routeTables/routes/write\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActivityUDRUpdate\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ActivityUDRUpdate\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Activity Log Route table update\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"Administrative\"\n },\n {\n \"field\": \"operationName\",\n \"equals\": \"Microsoft.Network/routeTables/routes/write\"\n },\n {\n \"field\": \"status\",\n \"containsAny\": [\n \"succeeded\"\n ]\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#64": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_NSG_Delete\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Activity Log NSG Delete Alert\",\n \"description\": \"Policy to Deploy Activity Log NSG Delete Alert\",\n \"metadata\": {\n \"version\": \"1.1.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"Project\": \"amba-monitoring\"\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/networkSecurityGroups\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"name\": \"ActivityNSGDelete\",\n \"existenceScope\": \"resourcegroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Administrative\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"operationName\"\n },\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Microsoft.Network/networkSecurityGroups/delete\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActivityNSGDelete\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ActivityNSGDelete\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Activity Log NSG Delete\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"Administrative\"\n },\n {\n \"field\": \"operationName\",\n \"equals\": \"Microsoft.Network/networkSecurityGroups/delete\"\n },\n {\n \"field\": \"status\",\n \"containsAny\": [\n \"succeeded\"\n ]\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"$fxv#65": {
"type": "Microsoft.Authorization/policySetDefinitions",
"apiVersion": "2021-06-01",
@@ -7633,9 +7633,9 @@
"policyDefinitionGroups": null
}
},
- "$fxv#7": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERGw_ExpressRouteBitsIn_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ERG ExpressRoute Bits In Alert\",\r\n \"description\": \"Policy to audit/deploy ER Gateway Connection BitsInPerSecond Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressroutegateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressroutegateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ERGatewayConnectionBitsInPerSecond\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressroutegateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayERBitsInAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ER Gateway Connection BitsInPerSecond\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ERGatewayConnectionBitsInPerSecond\",\r\n \"metricNamespace\": \"Microsoft.Network/expressroutegateways\",\r\n \"metricName\": \"ERGatewayConnectionBitsInPerSecond\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#8": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERGw_ExpressRouteBitsOut_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ERG ExpressRoute Bits Out Alert\",\r\n \"description\": \"Policy to audit/deploy ER Gateway Connection BitsOutPerSecond Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"1\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressroutegateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressroutegateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ERGatewayConnectionBitsOutPerSecond\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressroutegateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayERBitsOutAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ER Gateway Connection BitsOutPerSecond\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ERGatewayConnectionBitsOutPerSecond\",\r\n \"metricNamespace\": \"Microsoft.Network/expressroutegateways\",\r\n \"metricName\": \"ERGatewayConnectionBitsOutPerSecond\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#9": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ERGw_ExpressRouteCpuUtil_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy ERG ExpressRoute CPU Utilization Alert\",\r\n \"description\": \"Policy to audit/deploy ER Gateway Express Route CPU Utilization Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Network\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT1M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"80\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Network/expressroutegateways\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Network/expressroutegateways\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"ExpressRouteGatewayCpuUtilization\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressroutegateways/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayERCPUAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for ER Gateway Express Route CPU Utilization\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"ExpressRouteGatewayCpuUtilization\",\r\n \"metricNamespace\": \"Microsoft.Network/expressroutegateways\",\r\n \"metricName\": \"ExpressRouteGatewayCpuUtilization\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#7": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERGw_ExpressRouteBitsIn_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ERG ExpressRoute Bits In Alert\",\n \"description\": \"Policy to audit/deploy ER Gateway Connection BitsInPerSecond Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressroutegateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressroutegateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ERGatewayConnectionBitsInPerSecond\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressroutegateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayERBitsInAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ER Gateway Connection BitsInPerSecond\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ERGatewayConnectionBitsInPerSecond\",\n \"metricNamespace\": \"Microsoft.Network/expressroutegateways\",\n \"metricName\": \"ERGatewayConnectionBitsInPerSecond\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#8": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERGw_ExpressRouteBitsOut_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ERG ExpressRoute Bits Out Alert\",\n \"description\": \"Policy to audit/deploy ER Gateway Connection BitsOutPerSecond Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"0\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"1\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressroutegateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressroutegateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ERGatewayConnectionBitsOutPerSecond\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressroutegateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayERBitsOutAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ER Gateway Connection BitsOutPerSecond\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ERGatewayConnectionBitsOutPerSecond\",\n \"metricNamespace\": \"Microsoft.Network/expressroutegateways\",\n \"metricName\": \"ERGatewayConnectionBitsOutPerSecond\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#9": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ERGw_ExpressRouteCpuUtil_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy ERG ExpressRoute CPU Utilization Alert\",\n \"description\": \"Policy to audit/deploy ER Gateway Express Route CPU Utilization Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Network\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT1M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"80\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Network/expressroutegateways\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Network/expressroutegateways\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"ExpressRouteGatewayCpuUtilization\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/expressroutegateways/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-GatewayERCPUAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for ER Gateway Express Route CPU Utilization\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"ExpressRouteGatewayCpuUtilization\",\n \"metricNamespace\": \"Microsoft.Network/expressroutegateways\",\n \"metricName\": \"ExpressRouteGatewayCpuUtilization\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"cloudEnv": "[environment().name]",
"defaultDeploymentLocationByCloudType": {
"AzureCloud": "northeurope",
diff --git a/patterns/alz/policyDefinitions/policies-NotificationAssets.json b/patterns/alz/policyDefinitions/policies-NotificationAssets.json
index 98b8b120a..7f49462ec 100644
--- a/patterns/alz/policyDefinitions/policies-NotificationAssets.json
+++ b/patterns/alz/policyDefinitions/policies-NotificationAssets.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "17529802603679162517"
+ "version": "0.28.1.47646",
+ "templateHash": "12123499433833329399"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,8 +115,8 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_AlertProcessing_Rule\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AMBA Notification Assets\",\r\n \"description\": \"Policy to deploy Action Group and Alert Processing Rule for all AMBA alerts\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"ALZMonitorResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"ALZMonitorResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"Action Group Email Addresses\",\r\n \"description\": \"Email addresses to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"ALZLogicappResourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Logic App Resource Id\",\r\n \"description\": \"Logic App Resource Id for Action Group to send alerts to\"\r\n },\r\n \"defaultValue\": \"\"\r\n },\r\n \"ALZLogicappCallbackUrl\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Logic App Callback URL\",\r\n \"description\": \"Callback URL that triggers the Logic App\"\r\n },\r\n \"defaultValue\": \"\"\r\n },\r\n \"ALZArmRoleId\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Arm Role Ids\",\r\n \"description\": \"Arm Built-in Role Ids for action group to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"ALZEventHubResourceId\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Event Hub resource Ids\",\r\n \"description\": \"Event Hub resource Ids for action group to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"ALZWebhookServiceUri\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"Webhook Service Uri(s)\",\r\n \"description\": \"Indicates the service uri(s) of the webhook to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"ALZFunctionResourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Function Resource Id\",\r\n \"description\": \"Function Resource Id for Action Group to send alerts to\"\r\n },\r\n \"defaultValue\": \"\"\r\n },\r\n \"ALZFunctionTriggerUrl\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Function Trigger URL\",\r\n \"description\": \"URL that triggers the Function\"\r\n },\r\n \"defaultValue\": \"\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Customer defined Action Group Resource IDs\",\r\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"BYOAlertProcessingRule\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Customer defined Alert Processing Rule Resource ID\",\r\n \"description\": \"The Resource ID of an existing Alert Processing Rule already deployed by the customer in his environment\"\r\n },\r\n \"defaultValue\": \"\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Resources/subscriptions\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n },\r\n {\r\n \"value\": \"[[empty(parameters('BYOAlertProcessingRule'))]\",\r\n \"equals\": \"true\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"deployIfNotExists\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('ALZMonitorResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.AlertsManagement/actionRules/description\",\r\n \"equals\": \"AMBA Notification Assets - Alert Processing Rule for Subscription\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"ALZMonitorResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"ALZLogicappResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZLogicappCallbackUrl\": {\r\n \"type\": \"String\"\r\n },\r\n \"ALZArmRoleId\": {\r\n \"type\": \"array\"\r\n },\r\n \"ALZEventHubResourceId\": {\r\n \"type\": \"array\"\r\n },\r\n \"ALZWebhookServiceUri\": {\r\n \"type\": \"Array\"\r\n },\r\n \"ALZFunctionResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZFunctionTriggerUrl\": {\r\n \"type\": \"String\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n },\r\n \"BYOAlertProcessingRule\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {\r\n \"varBYOAlertProcessingRule\": \"[[if(empty(parameters('BYOAlertProcessingRule')), null(), trim(parameters('BYOAlertProcessingRule')))]\",\r\n \"varLogicAppReceivers\": [\r\n {\r\n \"name\": \"AlzLA-0\",\r\n \"resourceId\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), trim(parameters('ALZLogicappResourceId')))]\",\r\n \"callbackUrl\": \"[[if(empty(parameters('ALZLogicappCallbackUrl')), null(), trim(parameters('ALZLogicappCallbackUrl')))]\",\r\n \"useCommonSchema\": true\r\n }\r\n ],\r\n \"varAzureFunctionReceivers\": [\r\n {\r\n \"name\": \"AlzFa-0\",\r\n \"functionAppResourceId\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/functions/')[0])]\",\r\n \"functionName\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/')[10])]\",\r\n \"httpTriggerUrl\": \"[[if(empty(parameters('ALZFunctionTriggerUrl')), null(), trim(parameters('ALZFunctionTriggerUrl')))]\",\r\n \"useCommonAlertSchema\": true\r\n }\r\n ],\r\n \"copy\": [\r\n {\r\n \"name\": \"varEmailReceivers\",\r\n \"count\": \"[[length(parameters('ALZMonitorActionGroupEmail'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"name\": \"[[concat('AlzMail-', indexOf(parameters('ALZMonitorActionGroupEmail'), parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')]))]\",\r\n \"emailAddress\": \"[[trim(parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')])]\",\r\n \"useCommonSchema\": true\r\n }\r\n },\r\n {\r\n \"name\": \"varArmRoleReceivers\",\r\n \"count\": \"[[length(parameters('ALZArmRoleId'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"name\": \"[[concat('AlzARM-', indexOf(parameters('ALZArmRoleId'), parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')]))]\",\r\n \"roleId\": \"[[trim(parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')])]\",\r\n \"useCommonSchema\": true\r\n }\r\n },\r\n {\r\n \"name\": \"varEventHubReceivers\",\r\n \"count\": \"[[length(parameters('ALZEventHubResourceId'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"name\": \"[[concat('AlzEH-', indexOf(parameters('ALZEventHubResourceId'), parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]))]\",\r\n \"subscriptionId\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[2])]\",\r\n \"eventHubNameSpace\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[8])]\",\r\n \"eventHubName\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[10])]\",\r\n \"useCommonAlertSchema\": true,\r\n \"tenantId\": \"[[subscription().tenantId]\"\r\n }\r\n },\r\n {\r\n \"name\": \"varWebhookReceivers\",\r\n \"count\": \"[[length(parameters('ALZWebhookServiceUri'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"name\": \"[[concat('AlzWh-', indexOf(parameters('ALZWebhookServiceUri'), parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')]))]\",\r\n \"identifierUri\": \"null()\",\r\n \"objectId\": \"null()\",\r\n \"serviceUri\": \"[[trim(parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')])]\",\r\n \"useCommonAlertSchema\": true,\r\n \"tenantId\": \"null()\",\r\n \"useAadAuth\": \"false\"\r\n }\r\n },\r\n {\r\n \"name\": \"varAGIds\",\r\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varAGIds')])]\"\r\n }\r\n ]\r\n },\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('ALZMonitorResourceGroupName')]\",\r\n \"location\": \"[[parameters('ALZMonitorResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ActionGroupDeployment\",\r\n \"resourceGroup\": \"[[parameters('ALZMonitorResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('ALZMonitorResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"ALZLogicappResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZLogicappCallbackUrl\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZArmRoleId\": {\r\n \"type\": \"array\"\r\n },\r\n \"ALZEventHubResourceId\": {\r\n \"type\": \"array\"\r\n },\r\n \"ALZWebhookServiceUri\": {\r\n \"type\": \"Array\"\r\n },\r\n \"ALZFunctionResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZFunctionTriggerUrl\": {\r\n \"type\": \"string\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n },\r\n \"BYOAlertProcessingRule\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"condition\": \"[[and(empty(parameters('BYOActionGroup')), empty(parameters('BYOAlertProcessingRule')))]\",\r\n \"type\": \"Microsoft.Insights/actionGroups\",\r\n \"apiVersion\": \"2023-01-01\",\r\n \"name\": \"[[concat('ag-AMBA-', subscription().displayName, '-001')]\",\r\n \"location\": \"Global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"groupShortName\": \"ActGrp\",\r\n \"enabled\": true,\r\n \"emailReceivers\": \"[[if(empty(parameters('ALZMonitorActionGroupEmail')), null(), variables('varEmailReceivers'))]\",\r\n \"armRoleReceivers\": \"[[if(empty(parameters('ALZArmRoleId')), null(), variables('varArmRoleReceivers'))]\",\r\n \"logicAppReceivers\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), variables('varLogicAppReceivers'))]\",\r\n \"eventHubReceivers\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), variables('varEventHubReceivers'))]\",\r\n \"webhookReceivers\": \"[[if(empty(parameters('ALZWebhookServiceUri')), null(), variables('varWebhookReceivers'))]\",\r\n \"azureFunctionReceivers\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), variables('varAzureFunctionReceivers'))]\"\r\n }\r\n },\r\n {\r\n \"condition\": \"[[empty(parameters('BYOAlertProcessingRule'))]\",\r\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\r\n \"apiVersion\": \"2021-08-08\",\r\n \"name\": \"[[concat('apr-AMBA-',subscription().displayName, '-001')]\",\r\n \"location\": \"Global\",\r\n \"dependsOn\": [\r\n \"[[concat('ag-AMBA-', subscription().displayName, '-001')]\"\r\n ],\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"description\": \"AMBA Notification Assets - Alert Processing Rule for Subscription\",\r\n \"enabled\": true,\r\n \"actions\": [\r\n {\r\n \"actiongroupIds\": \"[[if(empty(parameters('BYOActionGroup')), array(concat(subscription().Id, '/resourceGroups/', parameters('ALZMonitorResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-', subscription().displayName, '-001')), variables('varAGIds'))]\",\r\n \"actionType\": \"AddActionGroups\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"ALZLogicappResourceId\": {\r\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\r\n },\r\n \"ALZLogicappCallbackUrl\": {\r\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\r\n },\r\n \"ALZArmRoleId\": {\r\n \"value\": \"[[parameters('ALZArmRoleId')]\"\r\n },\r\n \"ALZEventHubResourceId\": {\r\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\r\n },\r\n \"ALZWebhookServiceUri\": {\r\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\r\n },\r\n \"ALZFunctionResourceId\": {\r\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\r\n },\r\n \"ALZFunctionTriggerUrl\": {\r\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n },\r\n \"BYOAlertProcessingRule\": {\r\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\r\n },\r\n \"ALZMonitorResourceGroupTags\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\r\n },\r\n \"ALZMonitorResourceGroupLocation\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupLocation')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"ALZLogicappResourceId\": {\r\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\r\n },\r\n \"ALZLogicappCallbackUrl\": {\r\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\r\n },\r\n \"ALZArmRoleId\": {\r\n \"value\": \"[[parameters('ALZArmRoleId')]\"\r\n },\r\n \"ALZEventHubResourceId\": {\r\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\r\n },\r\n \"ALZWebhookServiceUri\": {\r\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\r\n },\r\n \"ALZFunctionResourceId\": {\r\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\r\n },\r\n \"ALZFunctionTriggerUrl\": {\r\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n },\r\n \"BYOAlertProcessingRule\": {\r\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#1": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_Suppression_AlertProcessing_Rule\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy AMBA Notification Suppression Asset\",\r\n \"description\": \"Policy to deploy empty and disabled suppression Alert Processing Rule for all AMBA alerts\",\r\n \"metadata\": {\r\n \"version\": \"1.1.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"ALZMonitorResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"ALZMonitorResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Resources/subscriptions\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"deployIfNotExists\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('ALZMonitorResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.AlertsManagement/actionRules/description\",\r\n \"equals\": \"AMBA Notification Assets - Suppression Alert Processing Rule for maintenance period for Subscription\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"ALZMonitorResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('ALZMonitorResourceGroupName')]\",\r\n \"location\": \"[[parameters('ALZMonitorResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"SuppressionRuleDeployment\",\r\n \"resourceGroup\": \"[[parameters('ALZMonitorResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('ALZMonitorResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\r\n \"apiVersion\": \"2021-08-08\",\r\n \"name\": \"[[concat('apr-AMBA-',subscription().displayName, '-002')]\",\r\n \"location\": \"Global\",\r\n \"dependsOn\": [],\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"scopes\": [\r\n \"[[subscription().Id]\"\r\n ],\r\n \"description\": \"AMBA Notification Assets - Suppression Alert Processing Rule for maintenance period for Subscription\",\r\n \"enabled\": false,\r\n \"actions\": [\r\n {\r\n \"actionType\": \"RemoveAllActionGroups\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\r\n },\r\n \"ALZMonitorResourceGroupTags\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\r\n },\r\n \"ALZMonitorResourceGroupLocation\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupLocation')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AlertProcessing_Rule\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AMBA Notification Assets\",\n \"description\": \"Policy to deploy Action Group and Alert Processing Rule for all AMBA alerts\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Action Group Email Addresses\",\n \"description\": \"Email addresses to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Logic App Resource Id\",\n \"description\": \"Logic App Resource Id for Action Group to send alerts to\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Logic App Callback URL\",\n \"description\": \"Callback URL that triggers the Logic App\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Arm Role Ids\",\n \"description\": \"Arm Built-in Role Ids for action group to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Event Hub resource Ids\",\n \"description\": \"Event Hub resource Ids for action group to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Webhook Service Uri(s)\",\n \"description\": \"Indicates the service uri(s) of the webhook to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Function Resource Id\",\n \"description\": \"Function Resource Id for Action Group to send alerts to\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Function Trigger URL\",\n \"description\": \"URL that triggers the Function\"\n },\n \"defaultValue\": \"\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Customer defined Action Group Resource IDs\",\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\n },\n \"defaultValue\": []\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Customer defined Alert Processing Rule Resource ID\",\n \"description\": \"The Resource ID of an existing Alert Processing Rule already deployed by the customer in his environment\"\n },\n \"defaultValue\": \"\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n },\n {\n \"value\": \"[[empty(parameters('BYOAlertProcessingRule'))]\",\n \"equals\": \"true\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"deployIfNotExists\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.AlertsManagement/actionRules/description\",\n \"equals\": \"AMBA Notification Assets - Alert Processing Rule for Subscription\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"string\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"String\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\"\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\"\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\"\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"string\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"String\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {\n \"varBYOAlertProcessingRule\": \"[[if(empty(parameters('BYOAlertProcessingRule')), null(), trim(parameters('BYOAlertProcessingRule')))]\",\n \"varLogicAppReceivers\": [\n {\n \"name\": \"AlzLA-0\",\n \"resourceId\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), trim(parameters('ALZLogicappResourceId')))]\",\n \"callbackUrl\": \"[[if(empty(parameters('ALZLogicappCallbackUrl')), null(), trim(parameters('ALZLogicappCallbackUrl')))]\",\n \"useCommonSchema\": true\n }\n ],\n \"varAzureFunctionReceivers\": [\n {\n \"name\": \"AlzFa-0\",\n \"functionAppResourceId\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/functions/')[0])]\",\n \"functionName\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/')[10])]\",\n \"httpTriggerUrl\": \"[[if(empty(parameters('ALZFunctionTriggerUrl')), null(), trim(parameters('ALZFunctionTriggerUrl')))]\",\n \"useCommonAlertSchema\": true\n }\n ],\n \"copy\": [\n {\n \"name\": \"varEmailReceivers\",\n \"count\": \"[[length(parameters('ALZMonitorActionGroupEmail'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzMail-', indexOf(parameters('ALZMonitorActionGroupEmail'), parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')]))]\",\n \"emailAddress\": \"[[trim(parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')])]\",\n \"useCommonSchema\": true\n }\n },\n {\n \"name\": \"varArmRoleReceivers\",\n \"count\": \"[[length(parameters('ALZArmRoleId'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzARM-', indexOf(parameters('ALZArmRoleId'), parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')]))]\",\n \"roleId\": \"[[trim(parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')])]\",\n \"useCommonSchema\": true\n }\n },\n {\n \"name\": \"varEventHubReceivers\",\n \"count\": \"[[length(parameters('ALZEventHubResourceId'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzEH-', indexOf(parameters('ALZEventHubResourceId'), parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]))]\",\n \"subscriptionId\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[2])]\",\n \"eventHubNameSpace\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[8])]\",\n \"eventHubName\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[10])]\",\n \"useCommonAlertSchema\": true,\n \"tenantId\": \"[[subscription().tenantId]\"\n }\n },\n {\n \"name\": \"varWebhookReceivers\",\n \"count\": \"[[length(parameters('ALZWebhookServiceUri'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzWh-', indexOf(parameters('ALZWebhookServiceUri'), parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')]))]\",\n \"identifierUri\": \"null()\",\n \"objectId\": \"null()\",\n \"serviceUri\": \"[[trim(parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')])]\",\n \"useCommonAlertSchema\": true,\n \"tenantId\": \"null()\",\n \"useAadAuth\": \"false\"\n }\n },\n {\n \"name\": \"varAGIds\",\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\n \"mode\": \"serial\",\n \"input\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varAGIds')])]\"\n }\n ]\n },\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"location\": \"[[parameters('ALZMonitorResourceGroupLocation')]\",\n \"tags\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActionGroupDeployment\",\n \"resourceGroup\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('ALZMonitorResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"string\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"string\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\"\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\"\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\"\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"string\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"string\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"condition\": \"[[and(empty(parameters('BYOActionGroup')), empty(parameters('BYOAlertProcessingRule')))]\",\n \"type\": \"Microsoft.Insights/actionGroups\",\n \"apiVersion\": \"2023-01-01\",\n \"name\": \"[[concat('ag-AMBA-', subscription().displayName, '-001')]\",\n \"location\": \"Global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"groupShortName\": \"ActGrp\",\n \"enabled\": true,\n \"emailReceivers\": \"[[if(empty(parameters('ALZMonitorActionGroupEmail')), null(), variables('varEmailReceivers'))]\",\n \"armRoleReceivers\": \"[[if(empty(parameters('ALZArmRoleId')), null(), variables('varArmRoleReceivers'))]\",\n \"logicAppReceivers\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), variables('varLogicAppReceivers'))]\",\n \"eventHubReceivers\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), variables('varEventHubReceivers'))]\",\n \"webhookReceivers\": \"[[if(empty(parameters('ALZWebhookServiceUri')), null(), variables('varWebhookReceivers'))]\",\n \"azureFunctionReceivers\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), variables('varAzureFunctionReceivers'))]\"\n }\n },\n {\n \"condition\": \"[[empty(parameters('BYOAlertProcessingRule'))]\",\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\n \"apiVersion\": \"2021-08-08\",\n \"name\": \"[[concat('apr-AMBA-',subscription().displayName, '-001')]\",\n \"location\": \"Global\",\n \"dependsOn\": [\n \"[[concat('ag-AMBA-', subscription().displayName, '-001')]\"\n ],\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"description\": \"AMBA Notification Assets - Alert Processing Rule for Subscription\",\n \"enabled\": true,\n \"actions\": [\n {\n \"actiongroupIds\": \"[[if(empty(parameters('BYOActionGroup')), array(concat(subscription().Id, '/resourceGroups/', parameters('ALZMonitorResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-', subscription().displayName, '-001')), variables('varAGIds'))]\",\n \"actionType\": \"AddActionGroups\"\n }\n ]\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"ALZLogicappResourceId\": {\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\n },\n \"ALZArmRoleId\": {\n \"value\": \"[[parameters('ALZArmRoleId')]\"\n },\n \"ALZEventHubResourceId\": {\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\n },\n \"ALZWebhookServiceUri\": {\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\n },\n \"ALZFunctionResourceId\": {\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n },\n \"BYOAlertProcessingRule\": {\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupLocation')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"ALZLogicappResourceId\": {\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\n },\n \"ALZArmRoleId\": {\n \"value\": \"[[parameters('ALZArmRoleId')]\"\n },\n \"ALZEventHubResourceId\": {\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\n },\n \"ALZWebhookServiceUri\": {\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\n },\n \"ALZFunctionResourceId\": {\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n },\n \"BYOAlertProcessingRule\": {\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#1": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Suppression_AlertProcessing_Rule\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AMBA Notification Suppression Asset\",\n \"description\": \"Policy to deploy empty and disabled suppression Alert Processing Rule for all AMBA alerts\",\n \"metadata\": {\n \"version\": \"1.1.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"deployIfNotExists\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.AlertsManagement/actionRules/description\",\n \"equals\": \"AMBA Notification Assets - Suppression Alert Processing Rule for maintenance period for Subscription\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"location\": \"[[parameters('ALZMonitorResourceGroupLocation')]\",\n \"tags\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"SuppressionRuleDeployment\",\n \"resourceGroup\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('ALZMonitorResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\n \"apiVersion\": \"2021-08-08\",\n \"name\": \"[[concat('apr-AMBA-',subscription().displayName, '-002')]\",\n \"location\": \"Global\",\n \"dependsOn\": [],\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"description\": \"AMBA Notification Assets - Suppression Alert Processing Rule for maintenance period for Subscription\",\n \"enabled\": false,\n \"actions\": [\n {\n \"actionType\": \"RemoveAllActionGroups\"\n }\n ]\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupLocation')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"$fxv#2": {
"type": "Microsoft.Authorization/policySetDefinitions",
"apiVersion": "2021-06-01",
diff --git a/patterns/alz/policyDefinitions/policies-RecoveryServices.json b/patterns/alz/policyDefinitions/policies-RecoveryServices.json
index 771bb2df8..e3b2e032c 100644
--- a/patterns/alz/policyDefinitions/policies-RecoveryServices.json
+++ b/patterns/alz/policyDefinitions/policies-RecoveryServices.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "5282983731915552739"
+ "version": "0.28.1.47646",
+ "templateHash": "10712232378503834341"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,7 +115,7 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_RecoveryVault_BackupHealthMonitor_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy RV Backup Health Monitoring Alerts\",\r\n \"description\": \"Policy to audit/update Recovery Vault Backup Health Alerting to Azure monitor alerts\",\r\n \"metadata\": {\r\n \"version\": \"1.1.0\",\r\n \"category\": \"Site Recovery\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"modify\",\r\n \"audit\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"modify\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.RecoveryServices/Vaults\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.RecoveryServices/vaults/monitoringSettings.azureMonitorAlertSettings.alertsForAllJobFailures\",\r\n \"notEquals\": \"Enabled\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"conflictEffect\": \"audit\",\r\n \"operations\": [\r\n {\r\n \"operation\": \"addOrReplace\",\r\n \"field\": \"Microsoft.RecoveryServices/vaults/monitoringSettings.classicAlertSettings.alertsForCriticalOperations\",\r\n \"value\": \"Disabled\"\r\n },\r\n {\r\n \"operation\": \"addOrReplace\",\r\n \"field\": \"Microsoft.RecoveryServices/vaults/monitoringSettings.azureMonitorAlertSettings.alertsForAllJobFailures\",\r\n \"value\": \"Enabled\"\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_RecoveryVault_BackupHealthMonitor_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy RV Backup Health Monitoring Alerts\",\n \"description\": \"Policy to audit/update Recovery Vault Backup Health Alerting to Azure monitor alerts\",\n \"metadata\": {\n \"version\": \"1.1.0\",\n \"category\": \"Site Recovery\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"modify\",\n \"audit\",\n \"disabled\"\n ],\n \"defaultValue\": \"modify\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.RecoveryServices/Vaults\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n },\n {\n \"field\": \"Microsoft.RecoveryServices/vaults/monitoringSettings.azureMonitorAlertSettings.alertsForAllJobFailures\",\n \"notEquals\": \"Enabled\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"conflictEffect\": \"audit\",\n \"operations\": [\n {\n \"operation\": \"addOrReplace\",\n \"field\": \"Microsoft.RecoveryServices/vaults/monitoringSettings.classicAlertSettings.alertsForCriticalOperations\",\n \"value\": \"Disabled\"\n },\n {\n \"operation\": \"addOrReplace\",\n \"field\": \"Microsoft.RecoveryServices/vaults/monitoringSettings.azureMonitorAlertSettings.alertsForAllJobFailures\",\n \"value\": \"Enabled\"\n }\n ]\n }\n }\n }\n }\n}\n",
"$fxv#1": {
"type": "Microsoft.Authorization/policySetDefinitions",
"apiVersion": "2021-06-01",
diff --git a/patterns/alz/policyDefinitions/policies-ServiceHealth.json b/patterns/alz/policyDefinitions/policies-ServiceHealth.json
index 41638e163..7a24e2e53 100644
--- a/patterns/alz/policyDefinitions/policies-ServiceHealth.json
+++ b/patterns/alz/policyDefinitions/policies-ServiceHealth.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "2552491670432335782"
+ "version": "0.28.1.47646",
+ "templateHash": "15128714091041583701"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,12 +115,12 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_ServiceHealth_ActionGroups\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Service Health Action Group\",\r\n \"description\": \"Policy to deploy action group for Service Health alerts\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n },\r\n \"ALZMonitorResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"ALZMonitorResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"ALZMonitorResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"Action Group Email Addresses\",\r\n \"description\": \"Email addresses to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"ALZLogicappResourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Logic App Resource Id\",\r\n \"description\": \"Logic App Resource Id for Action Group to send alerts to\"\r\n },\r\n \"defaultValue\": \"\"\r\n },\r\n \"ALZLogicappCallbackUrl\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Logic App Callback URL\",\r\n \"description\": \"Callback URL that triggers the Logic App\"\r\n },\r\n \"defaultValue\": \"\"\r\n },\r\n \"ALZArmRoleId\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Arm Role Ids\",\r\n \"description\": \"Arm Built-in Role Ids for action group to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"ALZEventHubResourceId\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Event Hub resource Ids\",\r\n \"description\": \"Event Hub resource Ids for action group to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"ALZWebhookServiceUri\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"Webhook Service Uri(s)\",\r\n \"description\": \"Indicates the service uri(s) of the webhook to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"ALZFunctionResourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Function Resource Id\",\r\n \"description\": \"Function Resource Id for Action Group to send alerts to\"\r\n },\r\n \"defaultValue\": \"\"\r\n },\r\n \"ALZFunctionTriggerUrl\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Function Trigger URL\",\r\n \"description\": \"URL that triggers the Function\"\r\n },\r\n \"defaultValue\": \"\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Customer defined Action Group Resource IDs\",\r\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"BYOAlertProcessingRule\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Customer defined Alert Processing Rule Resource ID\",\r\n \"description\": \"The Resource ID of an existing Alert Processing Rule already deployed by the customer in his environment\"\r\n },\r\n \"defaultValue\": \"\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Resources/subscriptions\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n },\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": \"true\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"deployIfNotExists\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/actionGroups\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('ALZMonitorResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": true\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/actionGroups/groupShortName\",\r\n \"equals\": \"SH-ActGrp\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"ALZMonitorResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"ALZLogicappResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZLogicappCallbackUrl\": {\r\n \"type\": \"String\"\r\n },\r\n \"ALZArmRoleId\": {\r\n \"type\": \"array\"\r\n },\r\n \"ALZEventHubResourceId\": {\r\n \"type\": \"array\"\r\n },\r\n \"ALZWebhookServiceUri\": {\r\n \"type\": \"Array\"\r\n },\r\n \"ALZFunctionResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZFunctionTriggerUrl\": {\r\n \"type\": \"String\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n },\r\n \"BYOAlertProcessingRule\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {\r\n \"varLogicAppReceivers\": [\r\n {\r\n \"name\": \"AlzLA-0\",\r\n \"resourceId\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), trim(parameters('ALZLogicappResourceId')))]\",\r\n \"callbackUrl\": \"[[if(empty(parameters('ALZLogicappCallbackUrl')), null(), trim(parameters('ALZLogicappCallbackUrl')))]\",\r\n \"useCommonSchema\": true\r\n }\r\n ],\r\n \"varAzureFunctionReceivers\": [\r\n {\r\n \"name\": \"AlzFa-0\",\r\n \"functionAppResourceId\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/functions/')[0])]\",\r\n \"functionName\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/')[10])]\",\r\n \"httpTriggerUrl\": \"[[if(empty(parameters('ALZFunctionTriggerUrl')), null(), trim(parameters('ALZFunctionTriggerUrl')))]\",\r\n \"useCommonAlertSchema\": true\r\n }\r\n ],\r\n \"copy\": [\r\n {\r\n \"name\": \"varEmailReceivers\",\r\n \"count\": \"[[length(parameters('ALZMonitorActionGroupEmail'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"name\": \"[[concat('AlzMail-', indexOf(parameters('ALZMonitorActionGroupEmail'), parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')]))]\",\r\n \"emailAddress\": \"[[trim(parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')])]\",\r\n \"useCommonSchema\": true\r\n }\r\n },\r\n {\r\n \"name\": \"varArmRoleReceivers\",\r\n \"count\": \"[[length(parameters('ALZArmRoleId'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"name\": \"[[concat('AlzARM-', indexOf(parameters('ALZArmRoleId'), parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')]))]\",\r\n \"roleId\": \"[[trim(parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')])]\",\r\n \"useCommonSchema\": true\r\n }\r\n },\r\n {\r\n \"name\": \"varEventHubReceivers\",\r\n \"count\": \"[[length(parameters('ALZEventHubResourceId'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"name\": \"[[concat('AlzEH-', indexOf(parameters('ALZEventHubResourceId'), parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]))]\",\r\n \"subscriptionId\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[2])]\",\r\n \"eventHubNameSpace\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[8])]\",\r\n \"eventHubName\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[10])]\",\r\n \"useCommonAlertSchema\": true,\r\n \"tenantId\": \"[[subscription().tenantId]\"\r\n }\r\n },\r\n {\r\n \"name\": \"varWebhookReceivers\",\r\n \"count\": \"[[length(parameters('ALZWebhookServiceUri'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"name\": \"[[concat('AlzWh-', indexOf(parameters('ALZWebhookServiceUri'), parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')]))]\",\r\n \"identifierUri\": \"null()\",\r\n \"objectId\": \"null()\",\r\n \"serviceUri\": \"[[trim(parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')])]\",\r\n \"useCommonAlertSchema\": true,\r\n \"tenantId\": \"null()\",\r\n \"useAadAuth\": \"false\"\r\n }\r\n }\r\n ]\r\n },\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('ALZMonitorResourceGroupName')]\",\r\n \"location\": \"[[parameters('ALZMonitorResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"SH-ActionGroupDeployment\",\r\n \"resourceGroup\": \"[[parameters('ALZMonitorResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('ALZMonitorResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"ALZLogicappResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZLogicappCallbackUrl\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZArmRoleId\": {\r\n \"type\": \"array\"\r\n },\r\n \"ALZEventHubResourceId\": {\r\n \"type\": \"array\"\r\n },\r\n \"ALZWebhookServiceUri\": {\r\n \"type\": \"Array\"\r\n },\r\n \"ALZFunctionResourceId\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZFunctionTriggerUrl\": {\r\n \"type\": \"string\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n },\r\n \"BYOAlertProcessingRule\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"type\": \"Microsoft.Insights/actionGroups\",\r\n \"apiVersion\": \"2023-01-01\",\r\n \"name\": \"[[concat('ag-AMBA-SH-', subscription().displayName, '-001')]\",\r\n \"location\": \"Global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"groupShortName\": \"SH-ActGrp\",\r\n \"enabled\": true,\r\n \"emailReceivers\": \"[[if(empty(parameters('ALZMonitorActionGroupEmail')), null(), variables('varEmailReceivers'))]\",\r\n \"armRoleReceivers\": \"[[if(empty(parameters('ALZArmRoleId')), null(), variables('varArmRoleReceivers'))]\",\r\n \"logicAppReceivers\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), variables('varLogicAppReceivers'))]\",\r\n \"eventHubReceivers\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), variables('varEventHubReceivers'))]\",\r\n \"webhookReceivers\": \"[[if(empty(parameters('ALZWebhookServiceUri')), null(), variables('varWebhookReceivers'))]\",\r\n \"azureFunctionReceivers\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), variables('varAzureFunctionReceivers'))]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"ALZLogicappResourceId\": {\r\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\r\n },\r\n \"ALZLogicappCallbackUrl\": {\r\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\r\n },\r\n \"ALZArmRoleId\": {\r\n \"value\": \"[[parameters('ALZArmRoleId')]\"\r\n },\r\n \"ALZEventHubResourceId\": {\r\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\r\n },\r\n \"ALZWebhookServiceUri\": {\r\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\r\n },\r\n \"ALZFunctionResourceId\": {\r\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\r\n },\r\n \"ALZFunctionTriggerUrl\": {\r\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n },\r\n \"BYOAlertProcessingRule\": {\r\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"ALZMonitorResourceGroupName\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\r\n },\r\n \"ALZMonitorResourceGroupTags\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\r\n },\r\n \"ALZMonitorResourceGroupLocation\": {\r\n \"value\": \"[[parameters('ALZMonitorResourceGroupLocation')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"ALZLogicappResourceId\": {\r\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\r\n },\r\n \"ALZLogicappCallbackUrl\": {\r\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\r\n },\r\n \"ALZArmRoleId\": {\r\n \"value\": \"[[parameters('ALZArmRoleId')]\"\r\n },\r\n \"ALZEventHubResourceId\": {\r\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\r\n },\r\n \"ALZWebhookServiceUri\": {\r\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\r\n },\r\n \"ALZFunctionResourceId\": {\r\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\r\n },\r\n \"ALZFunctionTriggerUrl\": {\r\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n },\r\n \"BYOAlertProcessingRule\": {\r\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#1": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_ResourceHealth_Unhealthy_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Resource Health Unhealthy Alert\",\r\n \"description\": \"Policy to Deploy Resource Health Unhealthy Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Customer defined Action Group Resource IDs\",\r\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\r\n },\r\n \"defaultValue\": []\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Resources/subscriptions\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": true\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\r\n \"contains\": \"ag-AMBA-SH-\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": false\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\r\n \"in\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n ]\r\n }\r\n },\r\n \"greaterOrEquals\": 1\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"ResourceHealth\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 1\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n }\r\n },\r\n \"variables\": {\r\n \"copy\": [\r\n {\r\n \"name\": \"varActionGroupIds\",\r\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"actionGroupId\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varActionGroupIds')])]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ResourceHealtAlert\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[resourceId('Microsoft.Resources/resourceGroups', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ResourceHealthUnhealthyAlert\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"[[concat(subscription().Id, '/resourceGroups/', parameters('alertResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-SH-', subscription().displayName, '-001')]\",\r\n \"webhookProperties\": {}\r\n }\r\n ]\r\n },\r\n \"description\": \"Resource Health Unhealthy Alert\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"ResourceHealth\"\r\n },\r\n {\r\n \"anyOf\": [\r\n {\r\n \"field\": \"properties.cause\",\r\n \"equals\": \"PlatformInitiated\"\r\n },\r\n {\r\n \"field\": \"properties.cause\",\r\n \"equals\": \"UserInitiated\"\r\n }\r\n ]\r\n },\r\n {\r\n \"anyOf\": [\r\n {\r\n \"field\": \"properties.currentHealthStatus\",\r\n \"equals\": \"Degraded\"\r\n },\r\n {\r\n \"field\": \"properties.currentHealthStatus\",\r\n \"equals\": \"Unavailable\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n },\r\n {\r\n \"condition\": \"[[not(empty(parameters('BYOActionGroup')))]\",\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ResourceHealthUnhealthyAlert\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"actions\": {\r\n \"actionGroups\": \"[[variables('varActionGroupIds')]\"\r\n },\r\n \"description\": \"Resource Health Unhealthy Alert\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"ResourceHealth\"\r\n },\r\n {\r\n \"anyOf\": [\r\n {\r\n \"field\": \"properties.cause\",\r\n \"equals\": \"PlatformInitiated\"\r\n },\r\n {\r\n \"field\": \"properties.cause\",\r\n \"equals\": \"UserInitiated\"\r\n }\r\n ]\r\n },\r\n {\r\n \"anyOf\": [\r\n {\r\n \"field\": \"properties.currentHealthStatus\",\r\n \"equals\": \"Degraded\"\r\n },\r\n {\r\n \"field\": \"properties.currentHealthStatus\",\r\n \"equals\": \"Unavailable\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#2": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_ServiceHealth_HealthAdvisory\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Service Health Advisory Alert\",\r\n \"description\": \"Policy to Deploy Service Health Advisory Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"Action Group Email Addresses\",\r\n \"description\": \"Email addresses to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Customer defined Action Group Resource IDs\",\r\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\r\n },\r\n \"defaultValue\": []\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Resources/subscriptions\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"existenceScope\": \"resourceGroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": true\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\r\n \"contains\": \"ag-AMBA-SH-\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": false\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\r\n \"in\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n ]\r\n }\r\n },\r\n \"greaterOrEquals\": 1\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"ServiceHealth\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"properties.incidentType\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"ActionRequired\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n }\r\n },\r\n \"variables\": {\r\n \"copy\": [\r\n {\r\n \"name\": \"varActionGroupIds\",\r\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"actionGroupId\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varActionGroupIds')])]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ServiceHealthHealth\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[resourceId('Microsoft.Resources/resourceGroups', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ServiceHealthAdvisoryEvent\",\r\n \"location\": \"Global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"[[concat(subscription().Id, '/resourceGroups/', parameters('alertResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-SH-', subscription().displayName, '-001')]\"\r\n }\r\n ]\r\n },\r\n \"description\": \"Service Health Advisory Alert\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"ServiceHealth\"\r\n },\r\n {\r\n \"field\": \"properties.incidentType\",\r\n \"equals\": \"ActionRequired\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n },\r\n {\r\n \"condition\": \"[[not(empty(parameters('BYOActionGroup')))]\",\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ServiceHealthAdvisoryEvent\",\r\n \"location\": \"Global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"actions\": {\r\n \"actionGroups\": \"[[variables('varActionGroupIds')]\"\r\n },\r\n \"description\": \"Service Health Advisory Alert\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"ServiceHealth\"\r\n },\r\n {\r\n \"field\": \"properties.incidentType\",\r\n \"equals\": \"ActionRequired\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#3": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_ServiceHealth_Incident\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Service Health Incident Alert\",\r\n \"description\": \"Policy to Deploy Service Health Incident Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"Action Group Email Addresses\",\r\n \"description\": \"Email addresses to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Customer defined Action Group Resource IDs\",\r\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\r\n },\r\n \"defaultValue\": []\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Resources/subscriptions\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"existenceScope\": \"resourcegroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": true\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\r\n \"contains\": \"ag-AMBA-SH-\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": false\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\r\n \"in\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n ]\r\n }\r\n },\r\n \"greaterOrEquals\": 1\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"ServiceHealth\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"properties.incidentType\"\r\n },\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Incident\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n }\r\n },\r\n \"variables\": {\r\n \"copy\": [\r\n {\r\n \"name\": \"varActionGroupIds\",\r\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"actionGroupId\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varActionGroupIds')])]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ServiceHealthIncident\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[resourceId('Microsoft.Resources/resourceGroups', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ServiceHealthIncident\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"[[concat(subscription().Id, '/resourceGroups/', parameters('alertResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-SH-', subscription().displayName, '-001')]\"\r\n }\r\n ]\r\n },\r\n \"description\": \"Service Health Incident Alert\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"ServiceHealth\"\r\n },\r\n {\r\n \"field\": \"properties.incidentType\",\r\n \"equals\": \"Incident\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n },\r\n {\r\n \"condition\": \"[[not(empty(parameters('BYOActionGroup')))]\",\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ServiceHealthIncident\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"actions\": {\r\n \"actionGroups\": \"[[variables('varActionGroupIds')]\"\r\n },\r\n \"description\": \"Service Health Incident Alert\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"ServiceHealth\"\r\n },\r\n {\r\n \"field\": \"properties.incidentType\",\r\n \"equals\": \"Incident\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#4": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_ServiceHealth_Maintenance\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Service Health Maintenance Alert\",\r\n \"description\": \"Policy to Deploy Service Health Maintenance Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"Action Group Email Addresses\",\r\n \"description\": \"Email addresses to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Customer defined Action Group Resource IDs\",\r\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\r\n },\r\n \"defaultValue\": []\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Resources/subscriptions\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"existenceScope\": \"resourcegroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": true\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\r\n \"contains\": \"ag-AMBA-SH-\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": false\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\r\n \"in\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n ]\r\n }\r\n },\r\n \"greaterOrEquals\": 1\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"ServiceHealth\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"properties.incidentType\"\r\n },\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Maintenance\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n }\r\n },\r\n \"variables\": {\r\n \"copy\": [\r\n {\r\n \"name\": \"varActionGroupIds\",\r\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"actionGroupId\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varActionGroupIds')])]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ServiceHealthMaintenance\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[resourceId('Microsoft.Resources/resourceGroups', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ServiceHealthPlannedMaintenance\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"[[concat(subscription().Id, '/resourceGroups/', parameters('alertResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-SH-', subscription().displayName, '-001')]\"\r\n }\r\n ]\r\n },\r\n \"description\": \"Service Health Planned Maintenance Alert\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"ServiceHealth\"\r\n },\r\n {\r\n \"field\": \"properties.incidentType\",\r\n \"equals\": \"Maintenance\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n },\r\n {\r\n \"condition\": \"[[not(empty(parameters('BYOActionGroup')))]\",\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ServiceHealthPlannedMaintenance\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"actions\": {\r\n \"actionGroups\": \"[[variables('varActionGroupIds')]\"\r\n },\r\n \"description\": \"Service Health Planned Maintenance Alert\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"ServiceHealth\"\r\n },\r\n {\r\n \"field\": \"properties.incidentType\",\r\n \"equals\": \"Maintenance\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#5": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_ServiceHealth_SecurityAdvisory\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Service Health Security Advisory Alert\",\r\n \"description\": \"Policy to Deploy Service Health Security Advisory Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.3.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"disabled\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"Action Group Email Addresses\",\r\n \"description\": \"Email addresses to send alerts to\"\r\n },\r\n \"defaultValue\": []\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"displayName\": \"Customer defined Action Group Resource IDs\",\r\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\r\n },\r\n \"defaultValue\": []\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Resources/subscriptions\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"existenceScope\": \"resourcegroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": true\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\r\n \"contains\": \"ag-AMBA-SH-\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"equals\": false\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\r\n \"in\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n ]\r\n }\r\n },\r\n \"greaterOrEquals\": 1\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"ServiceHealth\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"properties.incidentType\"\r\n },\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Security\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n }\r\n },\r\n \"variables\": {\r\n \"copy\": [\r\n {\r\n \"name\": \"varActionGroupIds\",\r\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\r\n \"mode\": \"serial\",\r\n \"input\": {\r\n \"actionGroupId\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varActionGroupIds')])]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ServiceSecurityIncident\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[resourceId('Microsoft.Resources/resourceGroups', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"type\": \"Array\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"type\": \"array\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ServiceHealthSecurityIncident\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"[[concat(subscription().Id, '/resourceGroups/', parameters('alertResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-SH-', subscription().displayName, '-001')]\"\r\n }\r\n ]\r\n },\r\n \"description\": \"Service Health Security Alert\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"ServiceHealth\"\r\n },\r\n {\r\n \"field\": \"properties.incidentType\",\r\n \"equals\": \"Security\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n },\r\n {\r\n \"condition\": \"[[not(empty(parameters('BYOActionGroup')))]\",\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"ServiceHealthSecurityIncident\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"actions\": {\r\n \"actionGroups\": \"[[variables('varActionGroupIds')]\"\r\n },\r\n \"description\": \"Service Health Security Alert\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"ServiceHealth\"\r\n },\r\n {\r\n \"field\": \"properties.incidentType\",\r\n \"equals\": \"Security\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n },\r\n \"ALZMonitorActionGroupEmail\": {\r\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\r\n },\r\n \"BYOActionGroup\": {\r\n \"value\": \"[[parameters('BYOActionGroup')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_ServiceHealth_ActionGroups\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Service Health Action Group\",\n \"description\": \"Policy to deploy action group for Service Health alerts\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n },\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Action Group Email Addresses\",\n \"description\": \"Email addresses to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Logic App Resource Id\",\n \"description\": \"Logic App Resource Id for Action Group to send alerts to\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Logic App Callback URL\",\n \"description\": \"Callback URL that triggers the Logic App\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Arm Role Ids\",\n \"description\": \"Arm Built-in Role Ids for action group to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Event Hub resource Ids\",\n \"description\": \"Event Hub resource Ids for action group to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Webhook Service Uri(s)\",\n \"description\": \"Indicates the service uri(s) of the webhook to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Function Resource Id\",\n \"description\": \"Function Resource Id for Action Group to send alerts to\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Function Trigger URL\",\n \"description\": \"URL that triggers the Function\"\n },\n \"defaultValue\": \"\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Customer defined Action Group Resource IDs\",\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\n },\n \"defaultValue\": []\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Customer defined Alert Processing Rule Resource ID\",\n \"description\": \"The Resource ID of an existing Alert Processing Rule already deployed by the customer in his environment\"\n },\n \"defaultValue\": \"\"\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n },\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": \"true\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"deployIfNotExists\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/actionGroups\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": true\n },\n {\n \"field\": \"Microsoft.Insights/actionGroups/groupShortName\",\n \"equals\": \"SH-ActGrp\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"string\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"String\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\"\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\"\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\"\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"string\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"String\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {\n \"varLogicAppReceivers\": [\n {\n \"name\": \"AlzLA-0\",\n \"resourceId\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), trim(parameters('ALZLogicappResourceId')))]\",\n \"callbackUrl\": \"[[if(empty(parameters('ALZLogicappCallbackUrl')), null(), trim(parameters('ALZLogicappCallbackUrl')))]\",\n \"useCommonSchema\": true\n }\n ],\n \"varAzureFunctionReceivers\": [\n {\n \"name\": \"AlzFa-0\",\n \"functionAppResourceId\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/functions/')[0])]\",\n \"functionName\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/')[10])]\",\n \"httpTriggerUrl\": \"[[if(empty(parameters('ALZFunctionTriggerUrl')), null(), trim(parameters('ALZFunctionTriggerUrl')))]\",\n \"useCommonAlertSchema\": true\n }\n ],\n \"copy\": [\n {\n \"name\": \"varEmailReceivers\",\n \"count\": \"[[length(parameters('ALZMonitorActionGroupEmail'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzMail-', indexOf(parameters('ALZMonitorActionGroupEmail'), parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')]))]\",\n \"emailAddress\": \"[[trim(parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')])]\",\n \"useCommonSchema\": true\n }\n },\n {\n \"name\": \"varArmRoleReceivers\",\n \"count\": \"[[length(parameters('ALZArmRoleId'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzARM-', indexOf(parameters('ALZArmRoleId'), parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')]))]\",\n \"roleId\": \"[[trim(parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')])]\",\n \"useCommonSchema\": true\n }\n },\n {\n \"name\": \"varEventHubReceivers\",\n \"count\": \"[[length(parameters('ALZEventHubResourceId'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzEH-', indexOf(parameters('ALZEventHubResourceId'), parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]))]\",\n \"subscriptionId\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[2])]\",\n \"eventHubNameSpace\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[8])]\",\n \"eventHubName\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[10])]\",\n \"useCommonAlertSchema\": true,\n \"tenantId\": \"[[subscription().tenantId]\"\n }\n },\n {\n \"name\": \"varWebhookReceivers\",\n \"count\": \"[[length(parameters('ALZWebhookServiceUri'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzWh-', indexOf(parameters('ALZWebhookServiceUri'), parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')]))]\",\n \"identifierUri\": \"null()\",\n \"objectId\": \"null()\",\n \"serviceUri\": \"[[trim(parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')])]\",\n \"useCommonAlertSchema\": true,\n \"tenantId\": \"null()\",\n \"useAadAuth\": \"false\"\n }\n }\n ]\n },\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"location\": \"[[parameters('ALZMonitorResourceGroupLocation')]\",\n \"tags\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"SH-ActionGroupDeployment\",\n \"resourceGroup\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('ALZMonitorResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"string\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"string\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\"\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\"\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\"\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"string\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"string\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"type\": \"Microsoft.Insights/actionGroups\",\n \"apiVersion\": \"2023-01-01\",\n \"name\": \"[[concat('ag-AMBA-SH-', subscription().displayName, '-001')]\",\n \"location\": \"Global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"groupShortName\": \"SH-ActGrp\",\n \"enabled\": true,\n \"emailReceivers\": \"[[if(empty(parameters('ALZMonitorActionGroupEmail')), null(), variables('varEmailReceivers'))]\",\n \"armRoleReceivers\": \"[[if(empty(parameters('ALZArmRoleId')), null(), variables('varArmRoleReceivers'))]\",\n \"logicAppReceivers\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), variables('varLogicAppReceivers'))]\",\n \"eventHubReceivers\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), variables('varEventHubReceivers'))]\",\n \"webhookReceivers\": \"[[if(empty(parameters('ALZWebhookServiceUri')), null(), variables('varWebhookReceivers'))]\",\n \"azureFunctionReceivers\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), variables('varAzureFunctionReceivers'))]\"\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"ALZLogicappResourceId\": {\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\n },\n \"ALZArmRoleId\": {\n \"value\": \"[[parameters('ALZArmRoleId')]\"\n },\n \"ALZEventHubResourceId\": {\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\n },\n \"ALZWebhookServiceUri\": {\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\n },\n \"ALZFunctionResourceId\": {\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n },\n \"BYOAlertProcessingRule\": {\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupLocation')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"ALZLogicappResourceId\": {\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\n },\n \"ALZArmRoleId\": {\n \"value\": \"[[parameters('ALZArmRoleId')]\"\n },\n \"ALZEventHubResourceId\": {\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\n },\n \"ALZWebhookServiceUri\": {\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\n },\n \"ALZFunctionResourceId\": {\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n },\n \"BYOAlertProcessingRule\": {\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#1": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_ResourceHealth_Unhealthy_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Resource Health Unhealthy Alert\",\n \"description\": \"Policy to Deploy Resource Health Unhealthy Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n },\n \"BYOActionGroup\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Customer defined Action Group Resource IDs\",\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\n },\n \"defaultValue\": []\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": true\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\n \"contains\": \"ag-AMBA-SH-\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": false\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\n \"in\": \"[[parameters('BYOActionGroup')]\"\n }\n ]\n }\n },\n \"greaterOrEquals\": 1\n }\n ]\n }\n ]\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"ResourceHealth\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 1\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n }\n },\n \"variables\": {\n \"copy\": [\n {\n \"name\": \"varActionGroupIds\",\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"actionGroupId\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varActionGroupIds')])]\"\n }\n }\n ]\n },\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ResourceHealtAlert\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[resourceId('Microsoft.Resources/resourceGroups', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ResourceHealthUnhealthyAlert\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"actions\": {\n \"actionGroups\": [\n {\n \"actionGroupId\": \"[[concat(subscription().Id, '/resourceGroups/', parameters('alertResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-SH-', subscription().displayName, '-001')]\",\n \"webhookProperties\": {}\n }\n ]\n },\n \"description\": \"Resource Health Unhealthy Alert\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"ResourceHealth\"\n },\n {\n \"anyOf\": [\n {\n \"field\": \"properties.cause\",\n \"equals\": \"PlatformInitiated\"\n },\n {\n \"field\": \"properties.cause\",\n \"equals\": \"UserInitiated\"\n }\n ]\n },\n {\n \"anyOf\": [\n {\n \"field\": \"properties.currentHealthStatus\",\n \"equals\": \"Degraded\"\n },\n {\n \"field\": \"properties.currentHealthStatus\",\n \"equals\": \"Unavailable\"\n }\n ]\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n },\n {\n \"condition\": \"[[not(empty(parameters('BYOActionGroup')))]\",\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ResourceHealthUnhealthyAlert\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"actions\": {\n \"actionGroups\": \"[[variables('varActionGroupIds')]\"\n },\n \"description\": \"Resource Health Unhealthy Alert\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"ResourceHealth\"\n },\n {\n \"anyOf\": [\n {\n \"field\": \"properties.cause\",\n \"equals\": \"PlatformInitiated\"\n },\n {\n \"field\": \"properties.cause\",\n \"equals\": \"UserInitiated\"\n }\n ]\n },\n {\n \"anyOf\": [\n {\n \"field\": \"properties.currentHealthStatus\",\n \"equals\": \"Degraded\"\n },\n {\n \"field\": \"properties.currentHealthStatus\",\n \"equals\": \"Unavailable\"\n }\n ]\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#2": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_ServiceHealth_HealthAdvisory\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Service Health Advisory Alert\",\n \"description\": \"Policy to Deploy Service Health Advisory Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Action Group Email Addresses\",\n \"description\": \"Email addresses to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"BYOActionGroup\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Customer defined Action Group Resource IDs\",\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\n },\n \"defaultValue\": []\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": true\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\n \"contains\": \"ag-AMBA-SH-\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": false\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\n \"in\": \"[[parameters('BYOActionGroup')]\"\n }\n ]\n }\n },\n \"greaterOrEquals\": 1\n }\n ]\n }\n ]\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"ServiceHealth\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"properties.incidentType\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"ActionRequired\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n }\n },\n \"variables\": {\n \"copy\": [\n {\n \"name\": \"varActionGroupIds\",\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"actionGroupId\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varActionGroupIds')])]\"\n }\n }\n ]\n },\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ServiceHealthHealth\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[resourceId('Microsoft.Resources/resourceGroups', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ServiceHealthAdvisoryEvent\",\n \"location\": \"Global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"actions\": {\n \"actionGroups\": [\n {\n \"actionGroupId\": \"[[concat(subscription().Id, '/resourceGroups/', parameters('alertResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-SH-', subscription().displayName, '-001')]\"\n }\n ]\n },\n \"description\": \"Service Health Advisory Alert\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"ServiceHealth\"\n },\n {\n \"field\": \"properties.incidentType\",\n \"equals\": \"ActionRequired\"\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n },\n {\n \"condition\": \"[[not(empty(parameters('BYOActionGroup')))]\",\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ServiceHealthAdvisoryEvent\",\n \"location\": \"Global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"actions\": {\n \"actionGroups\": \"[[variables('varActionGroupIds')]\"\n },\n \"description\": \"Service Health Advisory Alert\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"ServiceHealth\"\n },\n {\n \"field\": \"properties.incidentType\",\n \"equals\": \"ActionRequired\"\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#3": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_ServiceHealth_Incident\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Service Health Incident Alert\",\n \"description\": \"Policy to Deploy Service Health Incident Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Action Group Email Addresses\",\n \"description\": \"Email addresses to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"BYOActionGroup\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Customer defined Action Group Resource IDs\",\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\n },\n \"defaultValue\": []\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"existenceScope\": \"resourcegroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": true\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\n \"contains\": \"ag-AMBA-SH-\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": false\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\n \"in\": \"[[parameters('BYOActionGroup')]\"\n }\n ]\n }\n },\n \"greaterOrEquals\": 1\n }\n ]\n }\n ]\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"ServiceHealth\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"properties.incidentType\"\n },\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Incident\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n }\n },\n \"variables\": {\n \"copy\": [\n {\n \"name\": \"varActionGroupIds\",\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"actionGroupId\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varActionGroupIds')])]\"\n }\n }\n ]\n },\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ServiceHealthIncident\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[resourceId('Microsoft.Resources/resourceGroups', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ServiceHealthIncident\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"actions\": {\n \"actionGroups\": [\n {\n \"actionGroupId\": \"[[concat(subscription().Id, '/resourceGroups/', parameters('alertResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-SH-', subscription().displayName, '-001')]\"\n }\n ]\n },\n \"description\": \"Service Health Incident Alert\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"ServiceHealth\"\n },\n {\n \"field\": \"properties.incidentType\",\n \"equals\": \"Incident\"\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n },\n {\n \"condition\": \"[[not(empty(parameters('BYOActionGroup')))]\",\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ServiceHealthIncident\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"actions\": {\n \"actionGroups\": \"[[variables('varActionGroupIds')]\"\n },\n \"description\": \"Service Health Incident Alert\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"ServiceHealth\"\n },\n {\n \"field\": \"properties.incidentType\",\n \"equals\": \"Incident\"\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#4": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_ServiceHealth_Maintenance\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Service Health Maintenance Alert\",\n \"description\": \"Policy to Deploy Service Health Maintenance Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Action Group Email Addresses\",\n \"description\": \"Email addresses to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"BYOActionGroup\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Customer defined Action Group Resource IDs\",\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\n },\n \"defaultValue\": []\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"existenceScope\": \"resourcegroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": true\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\n \"contains\": \"ag-AMBA-SH-\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": false\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\n \"in\": \"[[parameters('BYOActionGroup')]\"\n }\n ]\n }\n },\n \"greaterOrEquals\": 1\n }\n ]\n }\n ]\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"ServiceHealth\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"properties.incidentType\"\n },\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Maintenance\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n }\n },\n \"variables\": {\n \"copy\": [\n {\n \"name\": \"varActionGroupIds\",\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"actionGroupId\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varActionGroupIds')])]\"\n }\n }\n ]\n },\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ServiceHealthMaintenance\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[resourceId('Microsoft.Resources/resourceGroups', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ServiceHealthPlannedMaintenance\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"actions\": {\n \"actionGroups\": [\n {\n \"actionGroupId\": \"[[concat(subscription().Id, '/resourceGroups/', parameters('alertResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-SH-', subscription().displayName, '-001')]\"\n }\n ]\n },\n \"description\": \"Service Health Planned Maintenance Alert\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"ServiceHealth\"\n },\n {\n \"field\": \"properties.incidentType\",\n \"equals\": \"Maintenance\"\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n },\n {\n \"condition\": \"[[not(empty(parameters('BYOActionGroup')))]\",\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ServiceHealthPlannedMaintenance\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"actions\": {\n \"actionGroups\": \"[[variables('varActionGroupIds')]\"\n },\n \"description\": \"Service Health Planned Maintenance Alert\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"ServiceHealth\"\n },\n {\n \"field\": \"properties.incidentType\",\n \"equals\": \"Maintenance\"\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#5": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_ServiceHealth_SecurityAdvisory\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Service Health Security Advisory Alert\",\n \"description\": \"Policy to Deploy Service Health Security Advisory Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"disabled\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Action Group Email Addresses\",\n \"description\": \"Email addresses to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"BYOActionGroup\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Customer defined Action Group Resource IDs\",\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\n },\n \"defaultValue\": []\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"existenceScope\": \"resourcegroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": true\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\n \"contains\": \"ag-AMBA-SH-\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"value\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"equals\": false\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/actions.actionGroups[*].actionGroupId\",\n \"in\": \"[[parameters('BYOActionGroup')]\"\n }\n ]\n }\n },\n \"greaterOrEquals\": 1\n }\n ]\n }\n ]\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"ServiceHealth\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"properties.incidentType\"\n },\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Security\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n }\n },\n \"variables\": {\n \"copy\": [\n {\n \"name\": \"varActionGroupIds\",\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"actionGroupId\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varActionGroupIds')])]\"\n }\n }\n ]\n },\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ServiceSecurityIncident\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[resourceId('Microsoft.Resources/resourceGroups', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"condition\": \"[[empty(parameters('BYOActionGroup'))]\",\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ServiceHealthSecurityIncident\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"actions\": {\n \"actionGroups\": [\n {\n \"actionGroupId\": \"[[concat(subscription().Id, '/resourceGroups/', parameters('alertResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-SH-', subscription().displayName, '-001')]\"\n }\n ]\n },\n \"description\": \"Service Health Security Alert\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"ServiceHealth\"\n },\n {\n \"field\": \"properties.incidentType\",\n \"equals\": \"Security\"\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n },\n {\n \"condition\": \"[[not(empty(parameters('BYOActionGroup')))]\",\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"ServiceHealthSecurityIncident\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"actions\": {\n \"actionGroups\": \"[[variables('varActionGroupIds')]\"\n },\n \"description\": \"Service Health Security Alert\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"ServiceHealth\"\n },\n {\n \"field\": \"properties.incidentType\",\n \"equals\": \"Security\"\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"$fxv#6": {
"type": "Microsoft.Authorization/policySetDefinitions",
"apiVersion": "2021-06-01",
diff --git a/patterns/alz/policyDefinitions/policies-Storage.json b/patterns/alz/policyDefinitions/policies-Storage.json
index 64902458b..412557ea2 100644
--- a/patterns/alz/policyDefinitions/policies-Storage.json
+++ b/patterns/alz/policyDefinitions/policies-Storage.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "8000521807620335020"
+ "version": "0.28.1.47646",
+ "templateHash": "10946686905813155329"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,8 +115,8 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_StorageAccount_Availability_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy SA Availability Alert\",\r\n \"description\": \"Policy to audit/deploy SA Availability Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Storage\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"1\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring resource. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Storage/storageAccounts\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Storage/storageAccounts\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"Availability\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Storage/storageAccounts/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"LessThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-AvailabilityAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for Storage Account Availability\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"Availability\",\r\n \"metricNamespace\": \"Microsoft.Storage/storageAccounts\",\r\n \"metricName\": \"Availability\",\r\n \"operator\": \"LessThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#1": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_activitylog_StorageAccount_Delete\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy Activity Log Storage Account Delete Alert\",\r\n \"description\": \"Policy to Deploy Activity Log Storage Account Delete Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Monitoring\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Name\",\r\n \"description\": \"Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"rg-amba-monitoring-001\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"Object\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Tags\",\r\n \"description\": \"Tags on the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": {\r\n \"_deployed_by_amba\": true\r\n }\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Resource Group Location\",\r\n \"description\": \"Location of the Resource group the alert is placed in\"\r\n },\r\n \"defaultValue\": \"centralus\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name to disable monitoring on resource. Set to true if monitoring should be disabled\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Storage/storageAccounts\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\r\n \"name\": \"Activity Log Storage Account Delete\",\r\n \"existenceScope\": \"resourcegroup\",\r\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\r\n \"deploymentScope\": \"subscription\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"count\": {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\r\n \"where\": {\r\n \"anyOf\": [\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"category\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Administrative\"\r\n }\r\n ]\r\n },\r\n {\r\n \"allOf\": [\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\r\n \"equals\": \"operationName\"\r\n },\r\n {\r\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\r\n \"equals\": \"Microsoft.Storage/storageAccounts/delete\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"type\": \"object\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Resources/resourceGroups\",\r\n \"apiVersion\": \"2021-04-01\",\r\n \"name\": \"[[parameters('alertResourceGroupName')]\",\r\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\r\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n {\r\n \"type\": \"Microsoft.Resources/deployments\",\r\n \"apiVersion\": \"2019-10-01\",\r\n \"name\": \"ActivitySADelete\",\r\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\r\n \"dependsOn\": [\r\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\r\n ],\r\n \"properties\": {\r\n \"mode\": \"Incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"type\": \"string\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"microsoft.insights/activityLogAlerts\",\r\n \"apiVersion\": \"2020-10-01\",\r\n \"name\": \"Activity Log Storage Account Delete\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Activity Log Storage Account Delete\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[subscription().id]\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\"\r\n },\r\n {\r\n \"field\": \"operationName\",\r\n \"equals\": \"Microsoft.Storage/storageAccounts/delete\"\r\n },\r\n {\r\n \"field\": \"status\",\r\n \"containsAny\": [\r\n \"succeeded\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"alertResourceGroupName\": {\r\n \"value\": \"[[parameters('alertResourceGroupName')]\"\r\n },\r\n \"alertResourceGroupTags\": {\r\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\r\n },\r\n \"alertResourceGroupLocation\": {\r\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_StorageAccount_Availability_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy SA Availability Alert\",\n \"description\": \"Policy to audit/deploy SA Availability Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Storage\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"1\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring resource. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Storage/storageAccounts\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Storage/storageAccounts\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"Availability\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Storage/storageAccounts/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"LessThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-AvailabilityAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for Storage Account Availability\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"Availability\",\n \"metricNamespace\": \"Microsoft.Storage/storageAccounts\",\n \"metricName\": \"Availability\",\n \"operator\": \"LessThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#1": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_activitylog_StorageAccount_Delete\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy Activity Log Storage Account Delete Alert\",\n \"description\": \"Policy to Deploy Activity Log Storage Account Delete Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-002\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring on resource. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Storage/storageAccounts\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/activityLogAlerts\",\n \"name\": \"Activity Log Storage Account Delete\",\n \"existenceScope\": \"resourcegroup\",\n \"resourceGroupName\": \"[[parameters('alertResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"count\": {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*]\",\n \"where\": {\n \"anyOf\": [\n {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"category\"\n },\n {\n \"field\": \"Microsoft.Insights/ActivityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Administrative\"\n }\n ]\n },\n {\n \"allOf\": [\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].field\",\n \"equals\": \"operationName\"\n },\n {\n \"field\": \"microsoft.insights/activityLogAlerts/condition.allOf[*].equals\",\n \"equals\": \"Microsoft.Storage/storageAccounts/delete\"\n }\n ]\n }\n ]\n }\n },\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"alertResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('alertResourceGroupName')]\",\n \"location\": \"[[parameters('alertResourceGroupLocation')]\",\n \"tags\": \"[[parameters('alertResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActivitySADelete\",\n \"resourceGroup\": \"[[parameters('alertResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('alertResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"enabled\": {\n \"type\": \"string\"\n },\n \"alertResourceGroupName\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"microsoft.insights/activityLogAlerts\",\n \"apiVersion\": \"2020-10-01\",\n \"name\": \"Activity Log Storage Account Delete\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Activity Log Storage Account Delete\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[subscription().id]\"\n ],\n \"condition\": {\n \"allOf\": [\n {\n \"field\": \"category\",\n \"equals\": \"Administrative\"\n },\n {\n \"field\": \"operationName\",\n \"equals\": \"Microsoft.Storage/storageAccounts/delete\"\n },\n {\n \"field\": \"status\",\n \"containsAny\": [\n \"succeeded\"\n ]\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"alertResourceGroupName\": {\n \"value\": \"[[parameters('alertResourceGroupName')]\"\n },\n \"alertResourceGroupTags\": {\n \"value\": \"[[parameters('alertResourceGroupTags')]\"\n },\n \"alertResourceGroupLocation\": {\n \"value\": \"[[parameters('alertResourceGroupLocation')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"$fxv#2": {
"type": "Microsoft.Authorization/policySetDefinitions",
"apiVersion": "2021-06-01",
diff --git a/patterns/alz/policyDefinitions/policies-Web.json b/patterns/alz/policyDefinitions/policies-Web.json
index 8becaaada..fdf1d5b76 100644
--- a/patterns/alz/policyDefinitions/policies-Web.json
+++ b/patterns/alz/policyDefinitions/policies-Web.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "17102138185941020353"
+ "version": "0.28.1.47646",
+ "templateHash": "9949929464866285214"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -115,10 +115,10 @@
"input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]"
}
],
- "$fxv#0": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_WSF_CPUPercentage_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy App Service Plan CPU Percentage Alert\",\r\n \"description\": \"Policy to audit/deploy App Service Plan CPU Percentage Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Web Services\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"90\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Web/serverfarms\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Web/serverfarms\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"CpuPercentage\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-CpuPercentage')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Service Plan CPU Percentage\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"CpuPercentage\",\r\n \"metricNamespace\": \"Microsoft.Web/serverfarms\",\r\n \"metricName\": \"CpuPercentage\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#1": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_WSF_DiskQueueLength_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy App Service Plan Disk Queue Length Alert\",\r\n \"description\": \"Policy to audit/deploy App Service Plan Disk Queue Length Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Web Services\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Web/serverfarms\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Web/serverfarms\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"DiskQueueLength\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-DiskQueueLengthAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Service Plan Disk Queue Length\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 2,\r\n \"minFailingPeriodsToAlert\": 2\r\n },\r\n \"name\": \"ServiceApiResult\",\r\n \"metricNamespace\": \"Microsoft.Web/serverfarms\",\r\n \"metricName\": \"DiskQueueLength\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#2": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_WSF_HttpQueueLength_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy App Service Plan Http Queue Length Alert\",\r\n \"description\": \"Policy to audit/deploy App Service Plan Http Queue Length Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"category\": \"Web Services\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"alzCloudEnvironments\": [\r\n \"AzureCloud\"\r\n ],\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Web/serverfarms\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Web/serverfarms\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"HttpQueueLength\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\r\n \"equals\": \"Medium\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\r\n \"equals\": 2\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\r\n \"equals\": 2\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-HttpQueueLengthAlert')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Service Plan Http Queue Length\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 2,\r\n \"minFailingPeriodsToAlert\": 2\r\n },\r\n \"name\": \"ServiceApiResult\",\r\n \"metricNamespace\": \"Microsoft.Web/serverfarms\",\r\n \"metricName\": \"HttpQueueLength\",\r\n \"operator\": \"GreaterThan\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
- "$fxv#3": "{\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"apiVersion\": \"2021-06-01\",\r\n \"name\": \"Deploy_WSF_MemoryPercentage_Alert\",\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"displayName\": \"Deploy App Service Plan Memory Percentage Alert\",\r\n \"description\": \"Policy to audit/deploy App Service Plan Memory Percentage Alert\",\r\n \"metadata\": {\r\n \"version\": \"1.2.0\",\r\n \"Category\": \"Web Services\",\r\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\r\n \"_deployed_by_amba\": \"True\"\r\n },\r\n \"parameters\": {\r\n \"severity\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Severity\",\r\n \"description\": \"Severity of the Alert\"\r\n },\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\",\r\n \"4\"\r\n ],\r\n \"defaultValue\": \"2\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Window Size\",\r\n \"description\": \"Window size for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\",\r\n \"PT6H\",\r\n \"PT12H\",\r\n \"P1D\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Evaluation Frequency\",\r\n \"description\": \"Evaluation frequency for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"PT1M\",\r\n \"PT5M\",\r\n \"PT15M\",\r\n \"PT30M\",\r\n \"PT1H\"\r\n ],\r\n \"defaultValue\": \"PT5M\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Auto Mitigate\",\r\n \"description\": \"Auto Mitigate for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Alert State\",\r\n \"description\": \"Alert state for the alert\"\r\n },\r\n \"allowedValues\": [\r\n \"true\",\r\n \"false\"\r\n ],\r\n \"defaultValue\": \"true\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Threshold\",\r\n \"description\": \"Threshold for the alert\"\r\n },\r\n \"defaultValue\": \"85\"\r\n },\r\n \"effect\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"Effect\",\r\n \"description\": \"Effect of the policy\"\r\n },\r\n \"allowedValues\": [\r\n \"deployIfNotExists\",\r\n \"disabled\"\r\n ],\r\n \"defaultValue\": \"deployIfNotExists\"\r\n },\r\n \"MonitorDisableTagName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag name\",\r\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": \"MonitorDisable\"\r\n },\r\n \"MonitorDisableTagValues\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\r\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\r\n },\r\n \"defaultValue\": [\r\n \"true\",\r\n \"Test\",\r\n \"Dev\",\r\n \"Sandbox\"\r\n ]\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"type\",\r\n \"equals\": \"Microsoft.Web/serverfarms\"\r\n },\r\n {\r\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\r\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\r\n }\r\n ]\r\n },\r\n \"then\": {\r\n \"effect\": \"[[parameters('effect')]\",\r\n \"details\": {\r\n \"roleDefinitionIds\": [\r\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n ],\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"existenceCondition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\r\n \"equals\": \"Microsoft.Web/serverfarms\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\r\n \"equals\": \"MemoryPercentage\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\r\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', field('fullName'))]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\r\n \"equals\": \"[[parameters('enabled')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\r\n \"equals\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\r\n \"equals\": \"[[parameters('windowSize')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\r\n \"equals\": \"[[parameters('severity')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\r\n \"equals\": \"[[parameters('autoMitigate')]\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\r\n \"equals\": \"Average\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\r\n \"equals\": \"GreaterThan\"\r\n },\r\n {\r\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\r\n \"equals\": \"[[parameters('threshold')]\"\r\n }\r\n ]\r\n },\r\n \"deployment\": {\r\n \"properties\": {\r\n \"mode\": \"incremental\",\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceName\",\r\n \"description\": \"Name of the resource\"\r\n }\r\n },\r\n \"resourceId\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"displayName\": \"resourceId\",\r\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\r\n }\r\n },\r\n \"severity\": {\r\n \"type\": \"String\"\r\n },\r\n \"windowSize\": {\r\n \"type\": \"String\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"type\": \"String\"\r\n },\r\n \"autoMitigate\": {\r\n \"type\": \"String\"\r\n },\r\n \"enabled\": {\r\n \"type\": \"String\"\r\n },\r\n \"threshold\": {\r\n \"type\": \"String\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"apiVersion\": \"2018-03-01\",\r\n \"name\": \"[[concat(parameters('resourceName'), '-MemoryPercentage')]\",\r\n \"location\": \"global\",\r\n \"tags\": {\r\n \"_deployed_by_amba\": true\r\n },\r\n \"properties\": {\r\n \"description\": \"Metric Alert for App Service Plan Memory Percentage\",\r\n \"severity\": \"[[parameters('severity')]\",\r\n \"enabled\": \"[[parameters('enabled')]\",\r\n \"scopes\": [\r\n \"[[parameters('resourceId')]\"\r\n ],\r\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\r\n \"windowSize\": \"[[parameters('windowSize')]\",\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"name\": \"MemoryPercentage\",\r\n \"metricNamespace\": \"Microsoft.Web/serverfarms\",\r\n \"metricName\": \"MemoryPercentage\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": \"[[parameters('threshold')]\",\r\n \"timeAggregation\": \"Average\",\r\n \"criterionType\": \"StaticThresholdCriterion\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n },\r\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\r\n \"parameters\": {\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resourceName\": {\r\n \"value\": \"[[field('name')]\"\r\n },\r\n \"resourceId\": {\r\n \"value\": \"[[field('id')]\"\r\n },\r\n \"severity\": {\r\n \"value\": \"[[parameters('severity')]\"\r\n },\r\n \"windowSize\": {\r\n \"value\": \"[[parameters('windowSize')]\"\r\n },\r\n \"evaluationFrequency\": {\r\n \"value\": \"[[parameters('evaluationFrequency')]\"\r\n },\r\n \"autoMitigate\": {\r\n \"value\": \"[[parameters('autoMitigate')]\"\r\n },\r\n \"enabled\": {\r\n \"value\": \"[[parameters('enabled')]\"\r\n },\r\n \"threshold\": {\r\n \"value\": \"[[parameters('threshold')]\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
+ "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_WSF_CPUPercentage_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy App Service Plan CPU Percentage Alert\",\n \"description\": \"Policy to audit/deploy App Service Plan CPU Percentage Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Web Services\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"90\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Web/serverfarms\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Web/serverfarms\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"CpuPercentage\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-CpuPercentage')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Service Plan CPU Percentage\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"CpuPercentage\",\n \"metricNamespace\": \"Microsoft.Web/serverfarms\",\n \"metricName\": \"CpuPercentage\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#1": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_WSF_DiskQueueLength_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy App Service Plan Disk Queue Length Alert\",\n \"description\": \"Policy to audit/deploy App Service Plan Disk Queue Length Alert\",\n \"metadata\": {\n \"version\": \"1.3.0\",\n \"category\": \"Web Services\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Web/serverfarms\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Web/serverfarms\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"DiskQueueLength\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-DiskQueueLengthAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Service Plan Disk Queue Length\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 2,\n \"minFailingPeriodsToAlert\": 2\n },\n \"name\": \"ServiceApiResult\",\n \"metricNamespace\": \"Microsoft.Web/serverfarms\",\n \"metricName\": \"DiskQueueLength\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#2": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_WSF_HttpQueueLength_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy App Service Plan Http Queue Length Alert\",\n \"description\": \"Policy to audit/deploy App Service Plan Http Queue Length Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"category\": \"Web Services\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Web/serverfarms\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Web/serverfarms\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"HttpQueueLength\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity\",\n \"equals\": \"Medium\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert\",\n \"equals\": 2\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.numberOfEvaluationPeriods\",\n \"equals\": 2\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-HttpQueueLengthAlert')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Service Plan Http Queue Length\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"alertSensitivity\": \"Medium\",\n \"failingPeriods\": {\n \"numberOfEvaluationPeriods\": 2,\n \"minFailingPeriodsToAlert\": 2\n },\n \"name\": \"ServiceApiResult\",\n \"metricNamespace\": \"Microsoft.Web/serverfarms\",\n \"metricName\": \"HttpQueueLength\",\n \"operator\": \"GreaterThan\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"DynamicThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
+ "$fxv#3": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_WSF_MemoryPercentage_Alert\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy App Service Plan Memory Percentage Alert\",\n \"description\": \"Policy to audit/deploy App Service Plan Memory Percentage Alert\",\n \"metadata\": {\n \"version\": \"1.2.0\",\n \"Category\": \"Web Services\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"severity\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Severity\",\n \"description\": \"Severity of the Alert\"\n },\n \"allowedValues\": [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\"\n ],\n \"defaultValue\": \"2\"\n },\n \"windowSize\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Window Size\",\n \"description\": \"Window size for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\",\n \"PT6H\",\n \"PT12H\",\n \"P1D\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Evaluation Frequency\",\n \"description\": \"Evaluation frequency for the alert\"\n },\n \"allowedValues\": [\n \"PT1M\",\n \"PT5M\",\n \"PT15M\",\n \"PT30M\",\n \"PT1H\"\n ],\n \"defaultValue\": \"PT5M\"\n },\n \"autoMitigate\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Auto Mitigate\",\n \"description\": \"Auto Mitigate for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"enabled\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert State\",\n \"description\": \"Alert state for the alert\"\n },\n \"allowedValues\": [\n \"true\",\n \"false\"\n ],\n \"defaultValue\": \"true\"\n },\n \"threshold\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Threshold\",\n \"description\": \"Threshold for the alert\"\n },\n \"defaultValue\": \"85\"\n },\n \"effect\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Effect\",\n \"description\": \"Effect of the policy\"\n },\n \"allowedValues\": [\n \"deployIfNotExists\",\n \"disabled\"\n ],\n \"defaultValue\": \"deployIfNotExists\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Web/serverfarms\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"[[parameters('effect')]\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricNamespace\",\n \"equals\": \"Microsoft.Web/serverfarms\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].metricName\",\n \"equals\": \"MemoryPercentage\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/scopes[*]\",\n \"equals\": \"[[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', field('fullName'))]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/enabled\",\n \"equals\": \"[[parameters('enabled')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/evaluationFrequency\",\n \"equals\": \"[[parameters('evaluationFrequency')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/windowSize\",\n \"equals\": \"[[parameters('windowSize')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricalerts/severity\",\n \"equals\": \"[[parameters('severity')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/autoMitigate\",\n \"equals\": \"[[parameters('autoMitigate')]\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-SingleResourceMultipleMetricCriteria.allOf[*].timeAggregation\",\n \"equals\": \"Average\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.operator\",\n \"equals\": \"GreaterThan\"\n },\n {\n \"field\": \"Microsoft.Insights/metricAlerts/criteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.allOf[*].StaticThresholdCriterion.threshold\",\n \"equals\": \"[[parameters('threshold')]\"\n }\n ]\n },\n \"deployment\": {\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"resourceName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceName\",\n \"description\": \"Name of the resource\"\n }\n },\n \"resourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"resourceId\",\n \"description\": \"Resource ID of the resource emitting the metric that will be used for the comparison\"\n }\n },\n \"severity\": {\n \"type\": \"String\"\n },\n \"windowSize\": {\n \"type\": \"String\"\n },\n \"evaluationFrequency\": {\n \"type\": \"String\"\n },\n \"autoMitigate\": {\n \"type\": \"String\"\n },\n \"enabled\": {\n \"type\": \"String\"\n },\n \"threshold\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Insights/metricAlerts\",\n \"apiVersion\": \"2018-03-01\",\n \"name\": \"[[concat(parameters('resourceName'), '-MemoryPercentage')]\",\n \"location\": \"global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"description\": \"Metric Alert for App Service Plan Memory Percentage\",\n \"severity\": \"[[parameters('severity')]\",\n \"enabled\": \"[[parameters('enabled')]\",\n \"scopes\": [\n \"[[parameters('resourceId')]\"\n ],\n \"evaluationFrequency\": \"[[parameters('evaluationFrequency')]\",\n \"windowSize\": \"[[parameters('windowSize')]\",\n \"criteria\": {\n \"allOf\": [\n {\n \"name\": \"MemoryPercentage\",\n \"metricNamespace\": \"Microsoft.Web/serverfarms\",\n \"metricName\": \"MemoryPercentage\",\n \"operator\": \"GreaterThan\",\n \"threshold\": \"[[parameters('threshold')]\",\n \"timeAggregation\": \"Average\",\n \"criterionType\": \"StaticThresholdCriterion\"\n }\n ],\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\n },\n \"autoMitigate\": \"[[parameters('autoMitigate')]\",\n \"parameters\": {\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"resourceName\": {\n \"value\": \"[[field('name')]\"\n },\n \"resourceId\": {\n \"value\": \"[[field('id')]\"\n },\n \"severity\": {\n \"value\": \"[[parameters('severity')]\"\n },\n \"windowSize\": {\n \"value\": \"[[parameters('windowSize')]\"\n },\n \"evaluationFrequency\": {\n \"value\": \"[[parameters('evaluationFrequency')]\"\n },\n \"autoMitigate\": {\n \"value\": \"[[parameters('autoMitigate')]\"\n },\n \"enabled\": {\n \"value\": \"[[parameters('enabled')]\"\n },\n \"threshold\": {\n \"value\": \"[[parameters('threshold')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n",
"$fxv#4": {
"type": "Microsoft.Authorization/policySetDefinitions",
"apiVersion": "2021-06-01",
diff --git a/patterns/alz/policyDefinitions/policySets.json b/patterns/alz/policyDefinitions/policySets.json
index 956898d6f..3ca0b4ef4 100644
--- a/patterns/alz/policyDefinitions/policySets.json
+++ b/patterns/alz/policyDefinitions/policySets.json
@@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
- "version": "0.18.4.5664",
- "templateHash": "12318508423994185141"
+ "version": "0.28.1.47646",
+ "templateHash": "10880240726186152271"
}
},
"parameters": {
@@ -13,8 +13,8 @@
"type": "string",
"defaultValue": "alz",
"metadata": {
- "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\"",
- "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!"
+ "message": "The JSON version of this file is programatically generated from Bicep. PLEASE DO NOT UPDATE MANUALLY!!",
+ "description": "Provide a prefix (unique at tenant-scope) for the Management Group hierarchy and other resources created as part of an Azure landing zone. DEFAULT VALUE = \"alz\""
}
},
"location": {
@@ -2712,6 +2712,19 @@
"description": "Severity of the alert"
}
},
+ "AGWApplicationGatewayTotalTimeAlertSensitivity": {
+ "type": "String",
+ "defaultValue": "Medium",
+ "allowedValues": [
+ "Low",
+ "Medium",
+ "High"
+ ],
+ "metadata": {
+ "displayName": "AGW Total Time Dynamic Alert Sensitivity",
+ "description": "Dynamic Sensitivity of the alert"
+ }
+ },
"AGWApplicationGatewayTotalTimeWindowSize": {
"type": "string",
"defaultValue": "PT5M",
@@ -2780,6 +2793,19 @@
"description": "Severity of the alert"
}
},
+ "AGWBackendLastByteResponseTimeAlertSensitivity": {
+ "type": "String",
+ "defaultValue": "Medium",
+ "allowedValues": [
+ "Low",
+ "Medium",
+ "High"
+ ],
+ "metadata": {
+ "displayName": "AGW Backend Last Byte Response Time Dynamic Alert Sensitivity",
+ "description": "Dynamic Severity of the alert"
+ }
+ },
"AGWBackendLastByteResponseTimeWindowSize": {
"type": "string",
"defaultValue": "PT5M",
@@ -3052,6 +3078,19 @@
"description": "Severity of the alert"
}
},
+ "AGWFailedRequestsAlertSensitivity": {
+ "type": "String",
+ "defaultValue": "Medium",
+ "allowedValues": [
+ "Low",
+ "Medium",
+ "High"
+ ],
+ "metadata": {
+ "displayName": "AGW Failed Requests Dynamic Alert Sensitivity",
+ "description": "Dynamic Sensitivity of the alert"
+ }
+ },
"AGWFailedRequestsWindowSize": {
"type": "string",
"defaultValue": "PT5M",
@@ -3120,6 +3159,19 @@
"description": "Severity of the alert"
}
},
+ "AGWResponseStatusAlertSensitivity": {
+ "type": "String",
+ "defaultValue": "Medium",
+ "allowedValues": [
+ "Low",
+ "Medium",
+ "High"
+ ],
+ "metadata": {
+ "displayName": "AGW Response Status Dynamic Alert Sensitivity",
+ "description": "Dynamic Sensitivity of the alert"
+ }
+ },
"AGWResponseStatusWindowSize": {
"type": "string",
"defaultValue": "PT5M",
@@ -5354,6 +5406,9 @@
"severity": {
"value": "[[[parameters('AGWApplicationGatewayTotalTimeAlertSeverity')]"
},
+ "alertSensitivity": {
+ "value": "[[[parameters('AGWApplicationGatewayTotalTimeAlertSensitivity')]"
+ },
"windowSize": {
"value": "[[[parameters('AGWApplicationGatewayTotalTimeWindowSize')]"
},
@@ -5381,6 +5436,9 @@
"severity": {
"value": "[[[parameters('AGWBackendLastByteResponseTimeAlertSeverity')]"
},
+ "alertSensitivity": {
+ "value": "[[[parameters('AGWBackendLastByteResponseTimeAlertSensitivity')]"
+ },
"windowSize": {
"value": "[[[parameters('AGWBackendLastByteResponseTimeWindowSize')]"
},
@@ -5489,6 +5547,9 @@
"severity": {
"value": "[[[parameters('AGWFailedRequestsAlertSeverity')]"
},
+ "alertSensitivity": {
+ "value": "[[[parameters('AGWFailedRequestsAlertSensitivity')]"
+ },
"windowSize": {
"value": "[[[parameters('AGWFailedRequestsWindowSize')]"
},
@@ -5516,6 +5577,9 @@
"severity": {
"value": "[[[parameters('AGWResponseStatusAlertSeverity')]"
},
+ "alertSensitivity": {
+ "value": "[[[parameters('AGWResponseStatusAlertSensitivity')]"
+ },
"windowSize": {
"value": "[[[parameters('AGWResponseStatusWindowSize')]"
},
diff --git a/patterns/alz/policySetDefinitions/Deploy-LandingZone-Alerts.json b/patterns/alz/policySetDefinitions/Deploy-LandingZone-Alerts.json
index c96cefdbe..27fe7ee42 100644
--- a/patterns/alz/policySetDefinitions/Deploy-LandingZone-Alerts.json
+++ b/patterns/alz/policySetDefinitions/Deploy-LandingZone-Alerts.json
@@ -2595,6 +2595,19 @@
"description": "Severity of the alert"
}
},
+ "AGWApplicationGatewayTotalTimeAlertSensitivity": {
+ "type": "String",
+ "defaultValue": "Medium",
+ "allowedValues": [
+ "Low",
+ "Medium",
+ "High"
+ ],
+ "metadata": {
+ "displayName": "AGW Total Time Dynamic Alert Sensitivity",
+ "description": "Dynamic Sensitivity of the alert"
+ }
+ },
"AGWApplicationGatewayTotalTimeWindowSize": {
"type": "string",
"defaultValue": "PT5M",
@@ -2663,6 +2676,19 @@
"description": "Severity of the alert"
}
},
+ "AGWBackendLastByteResponseTimeAlertSensitivity": {
+ "type": "String",
+ "defaultValue": "Medium",
+ "allowedValues": [
+ "Low",
+ "Medium",
+ "High"
+ ],
+ "metadata": {
+ "displayName": "AGW Backend Last Byte Response Time Dynamic Alert Sensitivity",
+ "description": "Dynamic Severity of the alert"
+ }
+ },
"AGWBackendLastByteResponseTimeWindowSize": {
"type": "string",
"defaultValue": "PT5M",
@@ -2935,6 +2961,19 @@
"description": "Severity of the alert"
}
},
+ "AGWFailedRequestsAlertSensitivity": {
+ "type": "String",
+ "defaultValue": "Medium",
+ "allowedValues": [
+ "Low",
+ "Medium",
+ "High"
+ ],
+ "metadata": {
+ "displayName": "AGW Failed Requests Dynamic Alert Sensitivity",
+ "description": "Dynamic Sensitivity of the alert"
+ }
+ },
"AGWFailedRequestsWindowSize": {
"type": "string",
"defaultValue": "PT5M",
@@ -3003,6 +3042,19 @@
"description": "Severity of the alert"
}
},
+ "AGWResponseStatusAlertSensitivity": {
+ "type": "String",
+ "defaultValue": "Medium",
+ "allowedValues": [
+ "Low",
+ "Medium",
+ "High"
+ ],
+ "metadata": {
+ "displayName": "AGW Response Status Dynamic Alert Sensitivity",
+ "description": "Dynamic Sensitivity of the alert"
+ }
+ },
"AGWResponseStatusWindowSize": {
"type": "string",
"defaultValue": "PT5M",
@@ -5237,6 +5289,9 @@
"severity": {
"value": "[[parameters('AGWApplicationGatewayTotalTimeAlertSeverity')]"
},
+ "alertSensitivity": {
+ "value": "[[parameters('AGWApplicationGatewayTotalTimeAlertSensitivity')]"
+ },
"windowSize": {
"value": "[[parameters('AGWApplicationGatewayTotalTimeWindowSize')]"
},
@@ -5264,6 +5319,9 @@
"severity": {
"value": "[[parameters('AGWBackendLastByteResponseTimeAlertSeverity')]"
},
+ "alertSensitivity": {
+ "value": "[[parameters('AGWBackendLastByteResponseTimeAlertSensitivity')]"
+ },
"windowSize": {
"value": "[[parameters('AGWBackendLastByteResponseTimeWindowSize')]"
},
@@ -5372,6 +5430,9 @@
"severity": {
"value": "[[parameters('AGWFailedRequestsAlertSeverity')]"
},
+ "alertSensitivity": {
+ "value": "[[parameters('AGWFailedRequestsAlertSensitivity')]"
+ },
"windowSize": {
"value": "[[parameters('AGWFailedRequestsWindowSize')]"
},
@@ -5399,6 +5460,9 @@
"severity": {
"value": "[[parameters('AGWResponseStatusAlertSeverity')]"
},
+ "alertSensitivity": {
+ "value": "[[parameters('AGWResponseStatusAlertSensitivity')]"
+ },
"windowSize": {
"value": "[[parameters('AGWResponseStatusWindowSize')]"
},
diff --git a/patterns/alz/templates/policies-Storage.bicep b/patterns/alz/templates/policies-Storage.bicep
index 49784e6af..d31a95e7c 100644
--- a/patterns/alz/templates/policies-Storage.bicep
+++ b/patterns/alz/templates/policies-Storage.bicep
@@ -68,8 +68,8 @@ var deploymentLocation = '"location": "${targetDeploymentLocationByCloudType[clo
var loadPolicyDefinitions = {
All: [
// Used in both Storage and Management Policy Set Definitions
- loadTextContent('../../../services/storage/StorageAccounts/Deploy-SA-Availability-Alert.json')
- loadTextContent('../../../services/storage/StorageAccounts/Deploy-ActivityLog-SA-Delete-Alert.json')
+ loadTextContent('../../../services/Storage/storageAccounts/Deploy-SA-Availability-Alert.json')
+ loadTextContent('../../../services/Storage/storageAccounts/Deploy-ActivityLog-SA-Delete-Alert.json')
]
AzureCloud: []
AzureChinaCloud: []
diff --git a/services/AVS/privateClouds/templates/arm/DiskUsedPercentage_23ac19cb-5eff-4cfa-9817-93466e1a94f7.json b/services/AVS/privateClouds/templates/arm/DiskUsedPercentage_23ac19cb-5eff-4cfa-9817-93466e1a94f7.json
new file mode 100644
index 000000000..0a8c980b8
--- /dev/null
+++ b/services/AVS/privateClouds/templates/arm/DiskUsedPercentage_23ac19cb-5eff-4cfa-9817-93466e1a94f7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percent of available disk used in Datastore",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "75",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DiskUsedPercentage",
+ "dimensions": [{"operator": "include", "name": "dsname", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/AVS/privateClouds/templates/arm/UsageAverage_b9f2fe91-023a-443c-b376-b12f0cd5d965.json b/services/AVS/privateClouds/templates/arm/UsageAverage_b9f2fe91-023a-443c-b376-b12f0cd5d965.json
new file mode 100644
index 000000000..2262e70f0
--- /dev/null
+++ b/services/AVS/privateClouds/templates/arm/UsageAverage_b9f2fe91-023a-443c-b376-b12f0cd5d965.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory usage as percentage of total configured or available memory",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UsageAverage",
+ "dimensions": [{"operator": "include", "name": "clustername", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/AVS/privateClouds/templates/bicep/DiskUsedPercentage_23ac19cb-5eff-4cfa-9817-93466e1a94f7.bicep b/services/AVS/privateClouds/templates/bicep/DiskUsedPercentage_23ac19cb-5eff-4cfa-9817-93466e1a94f7.bicep
new file mode 100644
index 000000000..7c650daf5
--- /dev/null
+++ b/services/AVS/privateClouds/templates/bicep/DiskUsedPercentage_23ac19cb-5eff-4cfa-9817-93466e1a94f7.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percent of available disk used in Datastore'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 75
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DiskUsedPercentage'
+ dimensions: [
+ {
+ name: 'dsname'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/AVS/privateClouds/templates/bicep/UsageAverage_b9f2fe91-023a-443c-b376-b12f0cd5d965.bicep b/services/AVS/privateClouds/templates/bicep/UsageAverage_b9f2fe91-023a-443c-b376-b12f0cd5d965.bicep
new file mode 100644
index 000000000..f8bb9864e
--- /dev/null
+++ b/services/AVS/privateClouds/templates/bicep/UsageAverage_b9f2fe91-023a-443c-b376-b12f0cd5d965.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory usage as percentage of total configured or available memory'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UsageAverage'
+ dimensions: [
+ {
+ name: 'clustername'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/AnalysisServices/servers/templates/arm/memorymetric_0289bc11-db65-4a58-91ed-fda8637322ec.json b/services/AnalysisServices/servers/templates/arm/memorymetric_0289bc11-db65-4a58-91ed-fda8637322ec.json
new file mode 100644
index 000000000..76536d42f
--- /dev/null
+++ b/services/AnalysisServices/servers/templates/arm/memorymetric_0289bc11-db65-4a58-91ed-fda8637322ec.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory. Range 0-25 GB for S1, 0-50 GB for S2 and 0-100 GB for S4",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "8000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "memory_metric",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/AnalysisServices/servers/templates/bicep/memorymetric_0289bc11-db65-4a58-91ed-fda8637322ec.bicep b/services/AnalysisServices/servers/templates/bicep/memorymetric_0289bc11-db65-4a58-91ed-fda8637322ec.bicep
new file mode 100644
index 000000000..2ec17c1e6
--- /dev/null
+++ b/services/AnalysisServices/servers/templates/bicep/memorymetric_0289bc11-db65-4a58-91ed-fda8637322ec.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory. Range 0-25 GB for S1, 0-50 GB for S2 and 0-100 GB for S4'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 8000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'memory_metric'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ApiManagement/service/templates/arm/BackendDuration_fd5d63e0-ab2f-4300-af65-05bf2e490d0e.json b/services/ApiManagement/service/templates/arm/BackendDuration_fd5d63e0-ab2f-4300-af65-05bf2e490d0e.json
new file mode 100644
index 000000000..86845c6dd
--- /dev/null
+++ b/services/ApiManagement/service/templates/arm/BackendDuration_fd5d63e0-ab2f-4300-af65-05bf2e490d0e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Duration of Backend Requests in milliseconds",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BackendDuration",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ApiManagement/service/templates/arm/Capacity_6b1dd1ae-05de-43d2-bdea-7981c49127fc.json b/services/ApiManagement/service/templates/arm/Capacity_6b1dd1ae-05de-43d2-bdea-7981c49127fc.json
new file mode 100644
index 000000000..0fea3f77d
--- /dev/null
+++ b/services/ApiManagement/service/templates/arm/Capacity_6b1dd1ae-05de-43d2-bdea-7981c49127fc.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Utilization metric for ApiManagement service. Note: For skus other than Premium, 'Max' aggregation will show the value as 0.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Capacity",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ApiManagement/service/templates/arm/Duration_52cd4aba-4ad0-402a-880d-ba625ebcf37f.json b/services/ApiManagement/service/templates/arm/Duration_52cd4aba-4ad0-402a-880d-ba625ebcf37f.json
new file mode 100644
index 000000000..6ec8048d4
--- /dev/null
+++ b/services/ApiManagement/service/templates/arm/Duration_52cd4aba-4ad0-402a-880d-ba625ebcf37f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Overall Duration of Gateway Requests in milliseconds",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "3000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Duration",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ApiManagement/service/templates/arm/FailedRequests_1f8626fe-812a-48a7-b237-2f9181a5ea12.json b/services/ApiManagement/service/templates/arm/FailedRequests_1f8626fe-812a-48a7-b237-2f9181a5ea12.json
new file mode 100644
index 000000000..1bf2a4a97
--- /dev/null
+++ b/services/ApiManagement/service/templates/arm/FailedRequests_1f8626fe-812a-48a7-b237-2f9181a5ea12.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of failures in gateway requests - Use multi-dimension request metric with GatewayResponseCodeCategory dimension instead",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FailedRequests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ApiManagement/service/templates/arm/Requests_2e16fd84-d92f-44ee-8191-ff47e90a9526.json b/services/ApiManagement/service/templates/arm/Requests_2e16fd84-d92f-44ee-8191-ff47e90a9526.json
new file mode 100644
index 000000000..e63065719
--- /dev/null
+++ b/services/ApiManagement/service/templates/arm/Requests_2e16fd84-d92f-44ee-8191-ff47e90a9526.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Gateway request metrics with multiple dimensions",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Requests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ApiManagement/service/templates/arm/TotalRequests_a9480e7f-1cd0-4c46-b5c4-e7f35fe963a5.json b/services/ApiManagement/service/templates/arm/TotalRequests_a9480e7f-1cd0-4c46-b5c4-e7f35fe963a5.json
new file mode 100644
index 000000000..63bf4d107
--- /dev/null
+++ b/services/ApiManagement/service/templates/arm/TotalRequests_a9480e7f-1cd0-4c46-b5c4-e7f35fe963a5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of gateway requests - Use multi-dimension request metric with GatewayResponseCodeCategory dimension instead",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalRequests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ApiManagement/service/templates/arm/UnauthorizedRequests_c0c3e784-f488-43a6-a423-18dbb444d443.json b/services/ApiManagement/service/templates/arm/UnauthorizedRequests_c0c3e784-f488-43a6-a423-18dbb444d443.json
new file mode 100644
index 000000000..b8f772010
--- /dev/null
+++ b/services/ApiManagement/service/templates/arm/UnauthorizedRequests_c0c3e784-f488-43a6-a423-18dbb444d443.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of unauthorized gateway requests - Use multi-dimension request metric with GatewayResponseCodeCategory dimension instead",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UnauthorizedRequests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ApiManagement/service/templates/bicep/BackendDuration_fd5d63e0-ab2f-4300-af65-05bf2e490d0e.bicep b/services/ApiManagement/service/templates/bicep/BackendDuration_fd5d63e0-ab2f-4300-af65-05bf2e490d0e.bicep
new file mode 100644
index 000000000..005501f87
--- /dev/null
+++ b/services/ApiManagement/service/templates/bicep/BackendDuration_fd5d63e0-ab2f-4300-af65-05bf2e490d0e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Duration of Backend Requests in milliseconds'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BackendDuration'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ApiManagement/service/templates/bicep/Capacity_6b1dd1ae-05de-43d2-bdea-7981c49127fc.bicep b/services/ApiManagement/service/templates/bicep/Capacity_6b1dd1ae-05de-43d2-bdea-7981c49127fc.bicep
new file mode 100644
index 000000000..f58a6fe0e
--- /dev/null
+++ b/services/ApiManagement/service/templates/bicep/Capacity_6b1dd1ae-05de-43d2-bdea-7981c49127fc.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Utilization metric for ApiManagement service. Note: For skus other than Premium, 'Max' aggregation will show the value as 0.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Capacity'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ApiManagement/service/templates/bicep/Duration_52cd4aba-4ad0-402a-880d-ba625ebcf37f.bicep b/services/ApiManagement/service/templates/bicep/Duration_52cd4aba-4ad0-402a-880d-ba625ebcf37f.bicep
new file mode 100644
index 000000000..4908213f9
--- /dev/null
+++ b/services/ApiManagement/service/templates/bicep/Duration_52cd4aba-4ad0-402a-880d-ba625ebcf37f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Overall Duration of Gateway Requests in milliseconds'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 3000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Duration'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ApiManagement/service/templates/bicep/FailedRequests_1f8626fe-812a-48a7-b237-2f9181a5ea12.bicep b/services/ApiManagement/service/templates/bicep/FailedRequests_1f8626fe-812a-48a7-b237-2f9181a5ea12.bicep
new file mode 100644
index 000000000..7420ad55d
--- /dev/null
+++ b/services/ApiManagement/service/templates/bicep/FailedRequests_1f8626fe-812a-48a7-b237-2f9181a5ea12.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of failures in gateway requests - Use multi-dimension request metric with GatewayResponseCodeCategory dimension instead'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FailedRequests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ApiManagement/service/templates/bicep/Requests_2e16fd84-d92f-44ee-8191-ff47e90a9526.bicep b/services/ApiManagement/service/templates/bicep/Requests_2e16fd84-d92f-44ee-8191-ff47e90a9526.bicep
new file mode 100644
index 000000000..cc85b8bdb
--- /dev/null
+++ b/services/ApiManagement/service/templates/bicep/Requests_2e16fd84-d92f-44ee-8191-ff47e90a9526.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Gateway request metrics with multiple dimensions'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Requests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ApiManagement/service/templates/bicep/TotalRequests_a9480e7f-1cd0-4c46-b5c4-e7f35fe963a5.bicep b/services/ApiManagement/service/templates/bicep/TotalRequests_a9480e7f-1cd0-4c46-b5c4-e7f35fe963a5.bicep
new file mode 100644
index 000000000..b2bf6eab4
--- /dev/null
+++ b/services/ApiManagement/service/templates/bicep/TotalRequests_a9480e7f-1cd0-4c46-b5c4-e7f35fe963a5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of gateway requests - Use multi-dimension request metric with GatewayResponseCodeCategory dimension instead'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalRequests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ApiManagement/service/templates/bicep/UnauthorizedRequests_c0c3e784-f488-43a6-a423-18dbb444d443.bicep b/services/ApiManagement/service/templates/bicep/UnauthorizedRequests_c0c3e784-f488-43a6-a423-18dbb444d443.bicep
new file mode 100644
index 000000000..79dc87608
--- /dev/null
+++ b/services/ApiManagement/service/templates/bicep/UnauthorizedRequests_c0c3e784-f488-43a6-a423-18dbb444d443.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of unauthorized gateway requests - Use multi-dimension request metric with GatewayResponseCodeCategory dimension instead'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UnauthorizedRequests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/App/containerApps/templates/arm/Replicas_94ae53cd-6e3b-47f5-9709-9c2e10eae6d7.json b/services/App/containerApps/templates/arm/Replicas_94ae53cd-6e3b-47f5-9709-9c2e10eae6d7.json
new file mode 100644
index 000000000..e4fd94d75
--- /dev/null
+++ b/services/App/containerApps/templates/arm/Replicas_94ae53cd-6e3b-47f5-9709-9c2e10eae6d7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of replicas count of container app",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Replicas",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/App/containerApps/templates/arm/RestartCount_b12cad96-7ef2-4223-97f4-53b3dc64ecfa.json b/services/App/containerApps/templates/arm/RestartCount_b12cad96-7ef2-4223-97f4-53b3dc64ecfa.json
new file mode 100644
index 000000000..9adc4cc42
--- /dev/null
+++ b/services/App/containerApps/templates/arm/RestartCount_b12cad96-7ef2-4223-97f4-53b3dc64ecfa.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Restart count of container app replicas",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "3",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RestartCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/App/containerApps/templates/arm/UsageNanoCores_a9e1306a-a541-423f-a69e-bd37f8f5013a.json b/services/App/containerApps/templates/arm/UsageNanoCores_a9e1306a-a541-423f-a69e-bd37f8f5013a.json
new file mode 100644
index 000000000..491264079
--- /dev/null
+++ b/services/App/containerApps/templates/arm/UsageNanoCores_a9e1306a-a541-423f-a69e-bd37f8f5013a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU consumed by the container app, in nano cores. 1,000,000,000 nano cores = 1 core",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "900000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UsageNanoCores",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/App/containerApps/templates/arm/WorkingSetBytes_423b4280-1f68-49d8-b11a-6a816b0d9172.json b/services/App/containerApps/templates/arm/WorkingSetBytes_423b4280-1f68-49d8-b11a-6a816b0d9172.json
new file mode 100644
index 000000000..b26bce4e9
--- /dev/null
+++ b/services/App/containerApps/templates/arm/WorkingSetBytes_423b4280-1f68-49d8-b11a-6a816b0d9172.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Container App working set memory used in bytes.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "500000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "WorkingSetBytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/App/containerApps/templates/bicep/Replicas_94ae53cd-6e3b-47f5-9709-9c2e10eae6d7.bicep b/services/App/containerApps/templates/bicep/Replicas_94ae53cd-6e3b-47f5-9709-9c2e10eae6d7.bicep
new file mode 100644
index 000000000..fa95d9d2c
--- /dev/null
+++ b/services/App/containerApps/templates/bicep/Replicas_94ae53cd-6e3b-47f5-9709-9c2e10eae6d7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of replicas count of container app'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Replicas'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/App/containerApps/templates/bicep/RestartCount_b12cad96-7ef2-4223-97f4-53b3dc64ecfa.bicep b/services/App/containerApps/templates/bicep/RestartCount_b12cad96-7ef2-4223-97f4-53b3dc64ecfa.bicep
new file mode 100644
index 000000000..4a45b34c9
--- /dev/null
+++ b/services/App/containerApps/templates/bicep/RestartCount_b12cad96-7ef2-4223-97f4-53b3dc64ecfa.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Restart count of container app replicas'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 3
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RestartCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/App/containerApps/templates/bicep/UsageNanoCores_a9e1306a-a541-423f-a69e-bd37f8f5013a.bicep b/services/App/containerApps/templates/bicep/UsageNanoCores_a9e1306a-a541-423f-a69e-bd37f8f5013a.bicep
new file mode 100644
index 000000000..858461b17
--- /dev/null
+++ b/services/App/containerApps/templates/bicep/UsageNanoCores_a9e1306a-a541-423f-a69e-bd37f8f5013a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU consumed by the container app, in nano cores. 1,000,000,000 nano cores = 1 core'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 900000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UsageNanoCores'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/App/containerApps/templates/bicep/WorkingSetBytes_423b4280-1f68-49d8-b11a-6a816b0d9172.bicep b/services/App/containerApps/templates/bicep/WorkingSetBytes_423b4280-1f68-49d8-b11a-6a816b0d9172.bicep
new file mode 100644
index 000000000..b0869f65f
--- /dev/null
+++ b/services/App/containerApps/templates/bicep/WorkingSetBytes_423b4280-1f68-49d8-b11a-6a816b0d9172.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Container App working set memory used in bytes.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 500000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'WorkingSetBytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Automation/automationAccounts/templates/arm/TotalJob_74e0e3b4-62aa-4503-b05d-c5c79a029ed6.json b/services/Automation/automationAccounts/templates/arm/TotalJob_74e0e3b4-62aa-4503-b05d-c5c79a029ed6.json
new file mode 100644
index 000000000..5e7687712
--- /dev/null
+++ b/services/Automation/automationAccounts/templates/arm/TotalJob_74e0e3b4-62aa-4503-b05d-c5c79a029ed6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The total number of jobs",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalJob",
+ "dimensions": [{"name": "Status", "operator": "Exclude", "values": ["Completed"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Automation/automationAccounts/templates/arm/TotalUpdateDeploymentMachineRuns_49e7f58f-4910-4d2f-8589-573e8a65c6dd.json b/services/Automation/automationAccounts/templates/arm/TotalUpdateDeploymentMachineRuns_49e7f58f-4910-4d2f-8589-573e8a65c6dd.json
new file mode 100644
index 000000000..346afb95a
--- /dev/null
+++ b/services/Automation/automationAccounts/templates/arm/TotalUpdateDeploymentMachineRuns_49e7f58f-4910-4d2f-8589-573e8a65c6dd.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total software update deployment machine runs in a software update deployment run",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalUpdateDeploymentMachineRuns",
+ "dimensions": [{"operator": "include", "name": "status", "values": ["failed"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Automation/automationAccounts/templates/arm/TotalUpdateDeploymentRuns_c521bf0d-efec-4d3a-8541-d8749915bfd4.json b/services/Automation/automationAccounts/templates/arm/TotalUpdateDeploymentRuns_c521bf0d-efec-4d3a-8541-d8749915bfd4.json
new file mode 100644
index 000000000..bbc43a419
--- /dev/null
+++ b/services/Automation/automationAccounts/templates/arm/TotalUpdateDeploymentRuns_c521bf0d-efec-4d3a-8541-d8749915bfd4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total software update deployment runs",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalUpdateDeploymentRuns",
+ "dimensions": [{"operator": "include", "name": "status", "values": ["failed"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Automation/automationAccounts/templates/bicep/TotalJob_74e0e3b4-62aa-4503-b05d-c5c79a029ed6.bicep b/services/Automation/automationAccounts/templates/bicep/TotalJob_74e0e3b4-62aa-4503-b05d-c5c79a029ed6.bicep
new file mode 100644
index 000000000..0687b2c5e
--- /dev/null
+++ b/services/Automation/automationAccounts/templates/bicep/TotalJob_74e0e3b4-62aa-4503-b05d-c5c79a029ed6.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The total number of jobs'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalJob'
+ dimensions: [
+ {
+ name: 'Status'
+ operator: 'Exclude'
+ values: ['Completed']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Automation/automationAccounts/templates/bicep/TotalUpdateDeploymentMachineRuns_49e7f58f-4910-4d2f-8589-573e8a65c6dd.bicep b/services/Automation/automationAccounts/templates/bicep/TotalUpdateDeploymentMachineRuns_49e7f58f-4910-4d2f-8589-573e8a65c6dd.bicep
new file mode 100644
index 000000000..f2024d5d0
--- /dev/null
+++ b/services/Automation/automationAccounts/templates/bicep/TotalUpdateDeploymentMachineRuns_49e7f58f-4910-4d2f-8589-573e8a65c6dd.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total software update deployment machine runs in a software update deployment run'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalUpdateDeploymentMachineRuns'
+ dimensions: [
+ {
+ name: 'status'
+ operator: 'include'
+ values: ['failed']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Automation/automationAccounts/templates/bicep/TotalUpdateDeploymentRuns_c521bf0d-efec-4d3a-8541-d8749915bfd4.bicep b/services/Automation/automationAccounts/templates/bicep/TotalUpdateDeploymentRuns_c521bf0d-efec-4d3a-8541-d8749915bfd4.bicep
new file mode 100644
index 000000000..6eca0b37f
--- /dev/null
+++ b/services/Automation/automationAccounts/templates/bicep/TotalUpdateDeploymentRuns_c521bf0d-efec-4d3a-8541-d8749915bfd4.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total software update deployment runs'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalUpdateDeploymentRuns'
+ dimensions: [
+ {
+ name: 'status'
+ operator: 'include'
+ values: ['failed']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Batch/batchAccounts/templates/arm/OfflineNodeCount_b40fdb04-cada-4870-80f3-317afc57e5fb.json b/services/Batch/batchAccounts/templates/arm/OfflineNodeCount_b40fdb04-cada-4870-80f3-317afc57e5fb.json
new file mode 100644
index 000000000..abc7d81f6
--- /dev/null
+++ b/services/Batch/batchAccounts/templates/arm/OfflineNodeCount_b40fdb04-cada-4870-80f3-317afc57e5fb.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of offline nodes",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OfflineNodeCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Batch/batchAccounts/templates/arm/PreemptedNodeCount_8ce7d791-41a5-4d6a-9516-b009eabbd8f7.json b/services/Batch/batchAccounts/templates/arm/PreemptedNodeCount_8ce7d791-41a5-4d6a-9516-b009eabbd8f7.json
new file mode 100644
index 000000000..f5fcc3e21
--- /dev/null
+++ b/services/Batch/batchAccounts/templates/arm/PreemptedNodeCount_8ce7d791-41a5-4d6a-9516-b009eabbd8f7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of preempted nodes",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PreemptedNodeCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Batch/batchAccounts/templates/arm/RebootingNodeCount_f49539ff-35b1-4d83-8541-e3cf49b383e5.json b/services/Batch/batchAccounts/templates/arm/RebootingNodeCount_f49539ff-35b1-4d83-8541-e3cf49b383e5.json
new file mode 100644
index 000000000..31f45c070
--- /dev/null
+++ b/services/Batch/batchAccounts/templates/arm/RebootingNodeCount_f49539ff-35b1-4d83-8541-e3cf49b383e5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of rebooting nodes",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RebootingNodeCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Batch/batchAccounts/templates/arm/TaskFailEvent_70b8ce6d-0d28-4997-84df-957791877eec.json b/services/Batch/batchAccounts/templates/arm/TaskFailEvent_70b8ce6d-0d28-4997-84df-957791877eec.json
new file mode 100644
index 000000000..c7aa6a73b
--- /dev/null
+++ b/services/Batch/batchAccounts/templates/arm/TaskFailEvent_70b8ce6d-0d28-4997-84df-957791877eec.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of tasks that have completed in a failed state",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TaskFailEvent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Batch/batchAccounts/templates/arm/UnusableNodeCount_6c9857e4-7d6b-4384-80da-b88a2e6858ac.json b/services/Batch/batchAccounts/templates/arm/UnusableNodeCount_6c9857e4-7d6b-4384-80da-b88a2e6858ac.json
new file mode 100644
index 000000000..69c999c44
--- /dev/null
+++ b/services/Batch/batchAccounts/templates/arm/UnusableNodeCount_6c9857e4-7d6b-4384-80da-b88a2e6858ac.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of unusable nodes",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UnusableNodeCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Batch/batchAccounts/templates/bicep/OfflineNodeCount_b40fdb04-cada-4870-80f3-317afc57e5fb.bicep b/services/Batch/batchAccounts/templates/bicep/OfflineNodeCount_b40fdb04-cada-4870-80f3-317afc57e5fb.bicep
new file mode 100644
index 000000000..f958a17c5
--- /dev/null
+++ b/services/Batch/batchAccounts/templates/bicep/OfflineNodeCount_b40fdb04-cada-4870-80f3-317afc57e5fb.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of offline nodes'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OfflineNodeCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Batch/batchAccounts/templates/bicep/PreemptedNodeCount_8ce7d791-41a5-4d6a-9516-b009eabbd8f7.bicep b/services/Batch/batchAccounts/templates/bicep/PreemptedNodeCount_8ce7d791-41a5-4d6a-9516-b009eabbd8f7.bicep
new file mode 100644
index 000000000..43e86b8e0
--- /dev/null
+++ b/services/Batch/batchAccounts/templates/bicep/PreemptedNodeCount_8ce7d791-41a5-4d6a-9516-b009eabbd8f7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of preempted nodes'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PreemptedNodeCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Batch/batchAccounts/templates/bicep/RebootingNodeCount_f49539ff-35b1-4d83-8541-e3cf49b383e5.bicep b/services/Batch/batchAccounts/templates/bicep/RebootingNodeCount_f49539ff-35b1-4d83-8541-e3cf49b383e5.bicep
new file mode 100644
index 000000000..354398cc1
--- /dev/null
+++ b/services/Batch/batchAccounts/templates/bicep/RebootingNodeCount_f49539ff-35b1-4d83-8541-e3cf49b383e5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of rebooting nodes'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RebootingNodeCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Batch/batchAccounts/templates/bicep/TaskFailEvent_70b8ce6d-0d28-4997-84df-957791877eec.bicep b/services/Batch/batchAccounts/templates/bicep/TaskFailEvent_70b8ce6d-0d28-4997-84df-957791877eec.bicep
new file mode 100644
index 000000000..2c4fb56da
--- /dev/null
+++ b/services/Batch/batchAccounts/templates/bicep/TaskFailEvent_70b8ce6d-0d28-4997-84df-957791877eec.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of tasks that have completed in a failed state'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TaskFailEvent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Batch/batchAccounts/templates/bicep/UnusableNodeCount_6c9857e4-7d6b-4384-80da-b88a2e6858ac.bicep b/services/Batch/batchAccounts/templates/bicep/UnusableNodeCount_6c9857e4-7d6b-4384-80da-b88a2e6858ac.bicep
new file mode 100644
index 000000000..bc5dac4e0
--- /dev/null
+++ b/services/Batch/batchAccounts/templates/bicep/UnusableNodeCount_6c9857e4-7d6b-4384-80da-b88a2e6858ac.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of unusable nodes'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UnusableNodeCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/arm/allconnectedclients_af750dfc-62e5-4b74-9514-ca419d800590.json b/services/Cache/Redis/templates/arm/allconnectedclients_af750dfc-62e5-4b74-9514-ca419d800590.json
new file mode 100644
index 000000000..d6cc08532
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/allconnectedclients_af750dfc-62e5-4b74-9514-ca419d800590.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of client connections to the cache. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "128",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "allconnectedclients",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/allpercentprocessortime_24c5276b-77b1-48ab-a8c1-15844b11e0aa.json b/services/Cache/Redis/templates/arm/allpercentprocessortime_24c5276b-77b1-48ab-a8c1-15844b11e0aa.json
new file mode 100644
index 000000000..33973b5b3
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/allpercentprocessortime_24c5276b-77b1-48ab-a8c1-15844b11e0aa.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The CPU utilization of the Azure Redis Cache server as a percentage. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "60",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "allpercentprocessortime",
+ "dimensions": [{"operator": "include", "name": "shardid", "values": ["*"]}, {"operator": "include", "name": "primary", "values": ["true"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/allserverLoad_7072ba94-41d2-4584-89ab-a5824ed045f4.json b/services/Cache/Redis/templates/arm/allserverLoad_7072ba94-41d2-4584-89ab-a5824ed045f4.json
new file mode 100644
index 000000000..6a50b802c
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/allserverLoad_7072ba94-41d2-4584-89ab-a5824ed045f4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of cycles in which the Redis server is busy processing and not waiting idle for messages. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "75",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "allserverLoad",
+ "dimensions": [{"operator": "include", "name": "shardid", "values": ["*"]}, {"operator": "include", "name": "primary", "values": ["true"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/allusedmemorypercentage_b9ffe52a-f430-4605-a2b1-d815eb1bcc56.json b/services/Cache/Redis/templates/arm/allusedmemorypercentage_b9ffe52a-f430-4605-a2b1-d815eb1bcc56.json
new file mode 100644
index 000000000..148d84441
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/allusedmemorypercentage_b9ffe52a-f430-4605-a2b1-d815eb1bcc56.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of cache memory used for key/value pairs. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "85",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "allusedmemorypercentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/cacheLatency_82cb3ad7-d44f-4131-9078-5aac82d3333a.json b/services/Cache/Redis/templates/arm/cacheLatency_82cb3ad7-d44f-4131-9078-5aac82d3333a.json
new file mode 100644
index 000000000..e93506074
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/cacheLatency_82cb3ad7-d44f-4131-9078-5aac82d3333a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The latency to the cache in microseconds. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cacheLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/cacheRead_cc764431-e1b0-4455-94b1-b66d32cc54b4.json b/services/Cache/Redis/templates/arm/cacheRead_cc764431-e1b0-4455-94b1-b66d32cc54b4.json
new file mode 100644
index 000000000..326518c76
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/cacheRead_cc764431-e1b0-4455-94b1-b66d32cc54b4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of data read from the cache in bytes per second. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "46875000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cacheRead",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/connectedclients_f0c2ec92-15bc-47b1-8edb-d0c5d10aaddc.json b/services/Cache/Redis/templates/arm/connectedclients_f0c2ec92-15bc-47b1-8edb-d0c5d10aaddc.json
new file mode 100644
index 000000000..b5114d5fa
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/connectedclients_f0c2ec92-15bc-47b1-8edb-d0c5d10aaddc.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of client connections to the cache. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "850",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "connectedclients",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/errors_24b37318-9353-4424-9d8e-ac28450328b6.json b/services/Cache/Redis/templates/arm/errors_24b37318-9353-4424-9d8e-ac28450328b6.json
new file mode 100644
index 000000000..eac4a9f68
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/errors_24b37318-9353-4424-9d8e-ac28450328b6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number errors that occured on the cache. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "errors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/percentProcessorTime_8d5df17c-a5b7-4cf1-a01e-f9d8625297a6.json b/services/Cache/Redis/templates/arm/percentProcessorTime_8d5df17c-a5b7-4cf1-a01e-f9d8625297a6.json
new file mode 100644
index 000000000..96a31fea1
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/percentProcessorTime_8d5df17c-a5b7-4cf1-a01e-f9d8625297a6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The CPU utilization of the Azure Redis Cache server as a percentage. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "percentProcessorTime",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/serverLoad_837ecf42-3f25-41ae-b97d-34193f0669da.json b/services/Cache/Redis/templates/arm/serverLoad_837ecf42-3f25-41ae-b97d-34193f0669da.json
new file mode 100644
index 000000000..d349d6790
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/serverLoad_837ecf42-3f25-41ae-b97d-34193f0669da.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of cycles in which the Redis server is busy processing and not waiting idle for messages. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "85",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "serverLoad",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/usedmemoryRss_1b68776d-4d11-4d27-96c5-4d51cf17e1fc.json b/services/Cache/Redis/templates/arm/usedmemoryRss_1b68776d-4d11-4d27-96c5-4d51cf17e1fc.json
new file mode 100644
index 000000000..19cd23c75
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/usedmemoryRss_1b68776d-4d11-4d27-96c5-4d51cf17e1fc.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of cache memory used in MB, including fragmentation and metadata. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "11000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "usedmemoryRss",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/usedmemory_aecc75bf-f961-4c22-86e9-84c5039a2938.json b/services/Cache/Redis/templates/arm/usedmemory_aecc75bf-f961-4c22-86e9-84c5039a2938.json
new file mode 100644
index 000000000..61c5755ce
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/usedmemory_aecc75bf-f961-4c22-86e9-84c5039a2938.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of cache memory used for key/value pairs in the cache in MB. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "200000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "usedmemory",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/arm/usedmemorypercentage_d6c4011c-f4e6-4b12-b6e6-9486eab0fecc.json b/services/Cache/Redis/templates/arm/usedmemorypercentage_d6c4011c-f4e6-4b12-b6e6-9486eab0fecc.json
new file mode 100644
index 000000000..f35ef6c16
--- /dev/null
+++ b/services/Cache/Redis/templates/arm/usedmemorypercentage_d6c4011c-f4e6-4b12-b6e6-9486eab0fecc.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of cache memory used for key/value pairs. For more details, see https://aka.ms/redis/metrics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "usedmemorypercentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cache/Redis/templates/bicep/allconnectedclients_af750dfc-62e5-4b74-9514-ca419d800590.bicep b/services/Cache/Redis/templates/bicep/allconnectedclients_af750dfc-62e5-4b74-9514-ca419d800590.bicep
new file mode 100644
index 000000000..57d93af64
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/allconnectedclients_af750dfc-62e5-4b74-9514-ca419d800590.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of client connections to the cache. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 128
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'allconnectedclients'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/allpercentprocessortime_24c5276b-77b1-48ab-a8c1-15844b11e0aa.bicep b/services/Cache/Redis/templates/bicep/allpercentprocessortime_24c5276b-77b1-48ab-a8c1-15844b11e0aa.bicep
new file mode 100644
index 000000000..63a973854
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/allpercentprocessortime_24c5276b-77b1-48ab-a8c1-15844b11e0aa.bicep
@@ -0,0 +1,145 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The CPU utilization of the Azure Redis Cache server as a percentage. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 60
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'allpercentprocessortime'
+ dimensions: [
+ {
+ name: 'shardid'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'primary'
+ operator: 'include'
+ values: ['true']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/allserverLoad_7072ba94-41d2-4584-89ab-a5824ed045f4.bicep b/services/Cache/Redis/templates/bicep/allserverLoad_7072ba94-41d2-4584-89ab-a5824ed045f4.bicep
new file mode 100644
index 000000000..7dbb4ac25
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/allserverLoad_7072ba94-41d2-4584-89ab-a5824ed045f4.bicep
@@ -0,0 +1,145 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of cycles in which the Redis server is busy processing and not waiting idle for messages. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 75
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'allserverLoad'
+ dimensions: [
+ {
+ name: 'shardid'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'primary'
+ operator: 'include'
+ values: ['true']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/allusedmemorypercentage_b9ffe52a-f430-4605-a2b1-d815eb1bcc56.bicep b/services/Cache/Redis/templates/bicep/allusedmemorypercentage_b9ffe52a-f430-4605-a2b1-d815eb1bcc56.bicep
new file mode 100644
index 000000000..504b70b28
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/allusedmemorypercentage_b9ffe52a-f430-4605-a2b1-d815eb1bcc56.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of cache memory used for key/value pairs. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 85
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'allusedmemorypercentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/cacheLatency_82cb3ad7-d44f-4131-9078-5aac82d3333a.bicep b/services/Cache/Redis/templates/bicep/cacheLatency_82cb3ad7-d44f-4131-9078-5aac82d3333a.bicep
new file mode 100644
index 000000000..684fec388
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/cacheLatency_82cb3ad7-d44f-4131-9078-5aac82d3333a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The latency to the cache in microseconds. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cacheLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/cacheRead_cc764431-e1b0-4455-94b1-b66d32cc54b4.bicep b/services/Cache/Redis/templates/bicep/cacheRead_cc764431-e1b0-4455-94b1-b66d32cc54b4.bicep
new file mode 100644
index 000000000..3b86b1e9f
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/cacheRead_cc764431-e1b0-4455-94b1-b66d32cc54b4.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of data read from the cache in bytes per second. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 46875000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cacheRead'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/connectedclients_f0c2ec92-15bc-47b1-8edb-d0c5d10aaddc.bicep b/services/Cache/Redis/templates/bicep/connectedclients_f0c2ec92-15bc-47b1-8edb-d0c5d10aaddc.bicep
new file mode 100644
index 000000000..32b4dfafa
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/connectedclients_f0c2ec92-15bc-47b1-8edb-d0c5d10aaddc.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of client connections to the cache. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 850
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'connectedclients'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/errors_24b37318-9353-4424-9d8e-ac28450328b6.bicep b/services/Cache/Redis/templates/bicep/errors_24b37318-9353-4424-9d8e-ac28450328b6.bicep
new file mode 100644
index 000000000..0a8e298b4
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/errors_24b37318-9353-4424-9d8e-ac28450328b6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number errors that occured on the cache. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'errors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/percentProcessorTime_8d5df17c-a5b7-4cf1-a01e-f9d8625297a6.bicep b/services/Cache/Redis/templates/bicep/percentProcessorTime_8d5df17c-a5b7-4cf1-a01e-f9d8625297a6.bicep
new file mode 100644
index 000000000..9143c17a6
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/percentProcessorTime_8d5df17c-a5b7-4cf1-a01e-f9d8625297a6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The CPU utilization of the Azure Redis Cache server as a percentage. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'percentProcessorTime'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/serverLoad_837ecf42-3f25-41ae-b97d-34193f0669da.bicep b/services/Cache/Redis/templates/bicep/serverLoad_837ecf42-3f25-41ae-b97d-34193f0669da.bicep
new file mode 100644
index 000000000..4aade8188
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/serverLoad_837ecf42-3f25-41ae-b97d-34193f0669da.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of cycles in which the Redis server is busy processing and not waiting idle for messages. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 85
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'serverLoad'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/usedmemoryRss_1b68776d-4d11-4d27-96c5-4d51cf17e1fc.bicep b/services/Cache/Redis/templates/bicep/usedmemoryRss_1b68776d-4d11-4d27-96c5-4d51cf17e1fc.bicep
new file mode 100644
index 000000000..522239a26
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/usedmemoryRss_1b68776d-4d11-4d27-96c5-4d51cf17e1fc.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of cache memory used in MB, including fragmentation and metadata. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 11000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'usedmemoryRss'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/usedmemory_aecc75bf-f961-4c22-86e9-84c5039a2938.bicep b/services/Cache/Redis/templates/bicep/usedmemory_aecc75bf-f961-4c22-86e9-84c5039a2938.bicep
new file mode 100644
index 000000000..eab3379cb
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/usedmemory_aecc75bf-f961-4c22-86e9-84c5039a2938.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of cache memory used for key/value pairs in the cache in MB. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 200000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'usedmemory'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cache/Redis/templates/bicep/usedmemorypercentage_d6c4011c-f4e6-4b12-b6e6-9486eab0fecc.bicep b/services/Cache/Redis/templates/bicep/usedmemorypercentage_d6c4011c-f4e6-4b12-b6e6-9486eab0fecc.bicep
new file mode 100644
index 000000000..09503653f
--- /dev/null
+++ b/services/Cache/Redis/templates/bicep/usedmemorypercentage_d6c4011c-f4e6-4b12-b6e6-9486eab0fecc.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of cache memory used for key/value pairs. For more details, see https://aka.ms/redis/metrics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'usedmemorypercentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cdn/profiles/templates/arm/ByteHitRatio_5e8aaa27-e5b3-4774-9807-af61ec96b001.json b/services/Cdn/profiles/templates/arm/ByteHitRatio_5e8aaa27-e5b3-4774-9807-af61ec96b001.json
new file mode 100644
index 000000000..6321868cb
--- /dev/null
+++ b/services/Cdn/profiles/templates/arm/ByteHitRatio_5e8aaa27-e5b3-4774-9807-af61ec96b001.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "This is the ratio of the total bytes served from the cache compared to the total response bytes",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ByteHitRatio",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cdn/profiles/templates/arm/OriginHealthPercentage_c42138d4-bb4c-4171-8802-ba44d671d72f.json b/services/Cdn/profiles/templates/arm/OriginHealthPercentage_c42138d4-bb4c-4171-8802-ba44d671d72f.json
new file mode 100644
index 000000000..78487461f
--- /dev/null
+++ b/services/Cdn/profiles/templates/arm/OriginHealthPercentage_c42138d4-bb4c-4171-8802-ba44d671d72f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of successful health probes from AFDX to backends.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OriginHealthPercentage",
+ "dimensions": [{"operator": "include", "name": "origingroup", "values": ["render"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cdn/profiles/templates/arm/Percentage5XX_c47441d4-7061-4acd-8ad8-69e52d00557c.json b/services/Cdn/profiles/templates/arm/Percentage5XX_c47441d4-7061-4acd-8ad8-69e52d00557c.json
new file mode 100644
index 000000000..03d55822c
--- /dev/null
+++ b/services/Cdn/profiles/templates/arm/Percentage5XX_c47441d4-7061-4acd-8ad8-69e52d00557c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of all the client requests for which the response status code is 5XX",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Percentage5XX",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cdn/profiles/templates/arm/RequestCount_cf6babc2-f623-4f12-a352-c30a02bcb6c6.json b/services/Cdn/profiles/templates/arm/RequestCount_cf6babc2-f623-4f12-a352-c30a02bcb6c6.json
new file mode 100644
index 000000000..91bfbc757
--- /dev/null
+++ b/services/Cdn/profiles/templates/arm/RequestCount_cf6babc2-f623-4f12-a352-c30a02bcb6c6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of client requests served by the HTTP/S proxy",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RequestCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cdn/profiles/templates/arm/TotalLatency_5fb9c4bf-3799-44e0-bd75-656d1cfa26d2.json b/services/Cdn/profiles/templates/arm/TotalLatency_5fb9c4bf-3799-44e0-bd75-656d1cfa26d2.json
new file mode 100644
index 000000000..672afd623
--- /dev/null
+++ b/services/Cdn/profiles/templates/arm/TotalLatency_5fb9c4bf-3799-44e0-bd75-656d1cfa26d2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The time calculated from when the client request was received by the HTTP/S proxy until the client acknowledged the last response byte from the HTTP/S proxy",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Cdn/profiles/templates/bicep/ByteHitRatio_5e8aaa27-e5b3-4774-9807-af61ec96b001.bicep b/services/Cdn/profiles/templates/bicep/ByteHitRatio_5e8aaa27-e5b3-4774-9807-af61ec96b001.bicep
new file mode 100644
index 000000000..1a7bd6253
--- /dev/null
+++ b/services/Cdn/profiles/templates/bicep/ByteHitRatio_5e8aaa27-e5b3-4774-9807-af61ec96b001.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'This is the ratio of the total bytes served from the cache compared to the total response bytes'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ByteHitRatio'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cdn/profiles/templates/bicep/OriginHealthPercentage_c42138d4-bb4c-4171-8802-ba44d671d72f.bicep b/services/Cdn/profiles/templates/bicep/OriginHealthPercentage_c42138d4-bb4c-4171-8802-ba44d671d72f.bicep
new file mode 100644
index 000000000..e65b7f5f5
--- /dev/null
+++ b/services/Cdn/profiles/templates/bicep/OriginHealthPercentage_c42138d4-bb4c-4171-8802-ba44d671d72f.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of successful health probes from AFDX to backends.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OriginHealthPercentage'
+ dimensions: [
+ {
+ name: 'origingroup'
+ operator: 'include'
+ values: ['render']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cdn/profiles/templates/bicep/Percentage5XX_c47441d4-7061-4acd-8ad8-69e52d00557c.bicep b/services/Cdn/profiles/templates/bicep/Percentage5XX_c47441d4-7061-4acd-8ad8-69e52d00557c.bicep
new file mode 100644
index 000000000..80beff7b4
--- /dev/null
+++ b/services/Cdn/profiles/templates/bicep/Percentage5XX_c47441d4-7061-4acd-8ad8-69e52d00557c.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of all the client requests for which the response status code is 5XX'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Percentage5XX'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cdn/profiles/templates/bicep/RequestCount_cf6babc2-f623-4f12-a352-c30a02bcb6c6.bicep b/services/Cdn/profiles/templates/bicep/RequestCount_cf6babc2-f623-4f12-a352-c30a02bcb6c6.bicep
new file mode 100644
index 000000000..bb90066e1
--- /dev/null
+++ b/services/Cdn/profiles/templates/bicep/RequestCount_cf6babc2-f623-4f12-a352-c30a02bcb6c6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of client requests served by the HTTP/S proxy'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RequestCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Cdn/profiles/templates/bicep/TotalLatency_5fb9c4bf-3799-44e0-bd75-656d1cfa26d2.bicep b/services/Cdn/profiles/templates/bicep/TotalLatency_5fb9c4bf-3799-44e0-bd75-656d1cfa26d2.bicep
new file mode 100644
index 000000000..845753c2b
--- /dev/null
+++ b/services/Cdn/profiles/templates/bicep/TotalLatency_5fb9c4bf-3799-44e0-bd75-656d1cfa26d2.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The time calculated from when the client request was received by the HTTP/S proxy until the client acknowledged the last response byte from the HTTP/S proxy'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/CognitiveServices/accounts/templates/arm/BlockedCalls_87fe8679-655d-4acb-a37c-b7faebe26d47.json b/services/CognitiveServices/accounts/templates/arm/BlockedCalls_87fe8679-655d-4acb-a37c-b7faebe26d47.json
new file mode 100644
index 000000000..eaebbe5c5
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/arm/BlockedCalls_87fe8679-655d-4acb-a37c-b7faebe26d47.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of calls that exceeded rate or quota limit.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BlockedCalls",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/CognitiveServices/accounts/templates/arm/ClientErrors_ec8c928a-5206-4059-8aea-8486004dd30d.json b/services/CognitiveServices/accounts/templates/arm/ClientErrors_ec8c928a-5206-4059-8aea-8486004dd30d.json
new file mode 100644
index 000000000..3707bb0a1
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/arm/ClientErrors_ec8c928a-5206-4059-8aea-8486004dd30d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of calls with client side error (HTTP response code 4xx).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ClientErrors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/CognitiveServices/accounts/templates/arm/Latency_d76ab40a-2831-4fa2-b476-5fdcda3d7c4c.json b/services/CognitiveServices/accounts/templates/arm/Latency_d76ab40a-2831-4fa2-b476-5fdcda3d7c4c.json
new file mode 100644
index 000000000..38da92fbd
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/arm/Latency_d76ab40a-2831-4fa2-b476-5fdcda3d7c4c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Latency in milliseconds.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Latency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/CognitiveServices/accounts/templates/arm/ServerErrors_3c550d9c-8276-4a61-b0cf-ef437a55e299.json b/services/CognitiveServices/accounts/templates/arm/ServerErrors_3c550d9c-8276-4a61-b0cf-ef437a55e299.json
new file mode 100644
index 000000000..bb5ecde96
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/arm/ServerErrors_3c550d9c-8276-4a61-b0cf-ef437a55e299.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of calls with service internal error (HTTP response code 5xx).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ServerErrors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/CognitiveServices/accounts/templates/arm/SuccessRate_80f3c9ae-7da9-462f-ab44-2ff80d27c8f1.json b/services/CognitiveServices/accounts/templates/arm/SuccessRate_80f3c9ae-7da9-462f-ab44-2ff80d27c8f1.json
new file mode 100644
index 000000000..21274fb86
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/arm/SuccessRate_80f3c9ae-7da9-462f-ab44-2ff80d27c8f1.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Availability percentage with the following calculation: (Total Calls - Server Errors)/Total Calls. Server Errors include any HTTP responses >=500.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SuccessRate",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/CognitiveServices/accounts/templates/arm/TokenTransaction_287a29bf-097d-4c4a-9ac5-df70a10f6903.json b/services/CognitiveServices/accounts/templates/arm/TokenTransaction_287a29bf-097d-4c4a-9ac5-df70a10f6903.json
new file mode 100644
index 000000000..70a512db0
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/arm/TokenTransaction_287a29bf-097d-4c4a-9ac5-df70a10f6903.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of Inference Tokens Processed on an OpenAI Model",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "180000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TokenTransaction",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/CognitiveServices/accounts/templates/arm/TotalCalls_07f1ae0a-94f3-41da-b3a6-ca9188e416cb.json b/services/CognitiveServices/accounts/templates/arm/TotalCalls_07f1ae0a-94f3-41da-b3a6-ca9188e416cb.json
new file mode 100644
index 000000000..3ec0bd7ad
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/arm/TotalCalls_07f1ae0a-94f3-41da-b3a6-ca9188e416cb.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of calls.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalCalls",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/CognitiveServices/accounts/templates/arm/TotalErrors_e228ad2d-7f9f-4843-88e2-57f6d44c59e9.json b/services/CognitiveServices/accounts/templates/arm/TotalErrors_e228ad2d-7f9f-4843-88e2-57f6d44c59e9.json
new file mode 100644
index 000000000..5a2eb0410
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/arm/TotalErrors_e228ad2d-7f9f-4843-88e2-57f6d44c59e9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of calls with error response (HTTP response code 4xx or 5xx).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalErrors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/CognitiveServices/accounts/templates/bicep/BlockedCalls_87fe8679-655d-4acb-a37c-b7faebe26d47.bicep b/services/CognitiveServices/accounts/templates/bicep/BlockedCalls_87fe8679-655d-4acb-a37c-b7faebe26d47.bicep
new file mode 100644
index 000000000..24bb27923
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/bicep/BlockedCalls_87fe8679-655d-4acb-a37c-b7faebe26d47.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of calls that exceeded rate or quota limit.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BlockedCalls'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/CognitiveServices/accounts/templates/bicep/ClientErrors_ec8c928a-5206-4059-8aea-8486004dd30d.bicep b/services/CognitiveServices/accounts/templates/bicep/ClientErrors_ec8c928a-5206-4059-8aea-8486004dd30d.bicep
new file mode 100644
index 000000000..8ef3ee774
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/bicep/ClientErrors_ec8c928a-5206-4059-8aea-8486004dd30d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of calls with client side error (HTTP response code 4xx).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ClientErrors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/CognitiveServices/accounts/templates/bicep/Latency_d76ab40a-2831-4fa2-b476-5fdcda3d7c4c.bicep b/services/CognitiveServices/accounts/templates/bicep/Latency_d76ab40a-2831-4fa2-b476-5fdcda3d7c4c.bicep
new file mode 100644
index 000000000..98204477a
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/bicep/Latency_d76ab40a-2831-4fa2-b476-5fdcda3d7c4c.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Latency in milliseconds.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Latency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/CognitiveServices/accounts/templates/bicep/ServerErrors_3c550d9c-8276-4a61-b0cf-ef437a55e299.bicep b/services/CognitiveServices/accounts/templates/bicep/ServerErrors_3c550d9c-8276-4a61-b0cf-ef437a55e299.bicep
new file mode 100644
index 000000000..0f7bc916c
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/bicep/ServerErrors_3c550d9c-8276-4a61-b0cf-ef437a55e299.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of calls with service internal error (HTTP response code 5xx).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ServerErrors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/CognitiveServices/accounts/templates/bicep/SuccessRate_80f3c9ae-7da9-462f-ab44-2ff80d27c8f1.bicep b/services/CognitiveServices/accounts/templates/bicep/SuccessRate_80f3c9ae-7da9-462f-ab44-2ff80d27c8f1.bicep
new file mode 100644
index 000000000..19b1a1cda
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/bicep/SuccessRate_80f3c9ae-7da9-462f-ab44-2ff80d27c8f1.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Availability percentage with the following calculation: (Total Calls - Server Errors)/Total Calls. Server Errors include any HTTP responses >=500.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SuccessRate'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/CognitiveServices/accounts/templates/bicep/TokenTransaction_287a29bf-097d-4c4a-9ac5-df70a10f6903.bicep b/services/CognitiveServices/accounts/templates/bicep/TokenTransaction_287a29bf-097d-4c4a-9ac5-df70a10f6903.bicep
new file mode 100644
index 000000000..272a7be66
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/bicep/TokenTransaction_287a29bf-097d-4c4a-9ac5-df70a10f6903.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of Inference Tokens Processed on an OpenAI Model'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 180000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TokenTransaction'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/CognitiveServices/accounts/templates/bicep/TotalCalls_07f1ae0a-94f3-41da-b3a6-ca9188e416cb.bicep b/services/CognitiveServices/accounts/templates/bicep/TotalCalls_07f1ae0a-94f3-41da-b3a6-ca9188e416cb.bicep
new file mode 100644
index 000000000..ae0f1040c
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/bicep/TotalCalls_07f1ae0a-94f3-41da-b3a6-ca9188e416cb.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of calls.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalCalls'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/CognitiveServices/accounts/templates/bicep/TotalErrors_e228ad2d-7f9f-4843-88e2-57f6d44c59e9.bicep b/services/CognitiveServices/accounts/templates/bicep/TotalErrors_e228ad2d-7f9f-4843-88e2-57f6d44c59e9.bicep
new file mode 100644
index 000000000..8e91ce6c8
--- /dev/null
+++ b/services/CognitiveServices/accounts/templates/bicep/TotalErrors_e228ad2d-7f9f-4843-88e2-57f6d44c59e9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of calls with error response (HTTP response code 4xx or 5xx).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalErrors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/AvailableMemoryBytes_d9089d09-ddec-4f6a-8dc1-e2544e5765cb.json b/services/Compute/virtualMachineScaleSets/templates/arm/AvailableMemoryBytes_d9089d09-ddec-4f6a-8dc1-e2544e5765cb.json
new file mode 100644
index 000000000..de27c3f30
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/AvailableMemoryBytes_d9089d09-ddec-4f6a-8dc1-e2544e5765cb.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Amount of physical memory, in bytes, immediately available for allocation to a process or for system use in the Virtual Machine",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Available Memory Bytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/DataDiskIOPSConsumedPercentage_a8c08a0f-fcd7-4b97-8a6e-06b34bac0b9f.json b/services/Compute/virtualMachineScaleSets/templates/arm/DataDiskIOPSConsumedPercentage_a8c08a0f-fcd7-4b97-8a6e-06b34bac0b9f.json
new file mode 100644
index 000000000..1ae1eca7e
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/DataDiskIOPSConsumedPercentage_a8c08a0f-fcd7-4b97-8a6e-06b34bac0b9f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of data disk I/Os consumed per minute",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Data Disk IOPS Consumed Percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/DiskReadOperationsSec_ea8be16a-f5e9-4a8b-a1df-a8c5efff039b.json b/services/Compute/virtualMachineScaleSets/templates/arm/DiskReadOperationsSec_ea8be16a-f5e9-4a8b-a1df-a8c5efff039b.json
new file mode 100644
index 000000000..fc2d75709
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/DiskReadOperationsSec_ea8be16a-f5e9-4a8b-a1df-a8c5efff039b.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Disk Read IOPS",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterOrLessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "Disk Read Operations/Sec",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/DiskWriteOperationsSec_dce1cda8-1dab-4941-b607-1d5d449709d5.json b/services/Compute/virtualMachineScaleSets/templates/arm/DiskWriteOperationsSec_dce1cda8-1dab-4941-b607-1d5d449709d5.json
new file mode 100644
index 000000000..03ea02c44
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/DiskWriteOperationsSec_dce1cda8-1dab-4941-b607-1d5d449709d5.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Disk Write IOPS",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterOrLessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "Disk Write Operations/Sec",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/InboundFlows_86991e6e-efc9-4898-adf8-4e8e3a60c57e.json b/services/Compute/virtualMachineScaleSets/templates/arm/InboundFlows_86991e6e-efc9-4898-adf8-4e8e3a60c57e.json
new file mode 100644
index 000000000..935ca2eee
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/InboundFlows_86991e6e-efc9-4898-adf8-4e8e3a60c57e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Inbound Flows are number of current flows in the inbound direction (traffic going into the VM)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Inbound Flows",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/NetworkInTotal_f0e94112-5509-47b6-8def-91fb5ca5d0cd.json b/services/Compute/virtualMachineScaleSets/templates/arm/NetworkInTotal_f0e94112-5509-47b6-8def-91fb5ca5d0cd.json
new file mode 100644
index 000000000..afb774db9
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/NetworkInTotal_f0e94112-5509-47b6-8def-91fb5ca5d0cd.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of bytes received on all network interfaces by the Virtual Machine(s) (Incoming Traffic)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "700000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Network In Total",
+ "dimensions": [{"operator": "include", "name": "vmname", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/NetworkIn_87dfe717-217f-4447-b59a-7ea39160b83a.json b/services/Compute/virtualMachineScaleSets/templates/arm/NetworkIn_87dfe717-217f-4447-b59a-7ea39160b83a.json
new file mode 100644
index 000000000..7ead520a1
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/NetworkIn_87dfe717-217f-4447-b59a-7ea39160b83a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of billable bytes received on all network interfaces by the Virtual Machine(s) (Incoming Traffic) (Deprecated)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Network In",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/NetworkOutTotal_98de2aed-3493-4e65-919b-b1f8e6995819.json b/services/Compute/virtualMachineScaleSets/templates/arm/NetworkOutTotal_98de2aed-3493-4e65-919b-b1f8e6995819.json
new file mode 100644
index 000000000..6db0c0511
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/NetworkOutTotal_98de2aed-3493-4e65-919b-b1f8e6995819.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of bytes out on all network interfaces by the Virtual Machine(s) (Outgoing Traffic)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "700000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Network Out Total",
+ "dimensions": [{"operator": "include", "name": "vmname", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/OSDiskIOPSConsumedPercentage_55dc79f4-5666-420f-8c53-141d73e01fee.json b/services/Compute/virtualMachineScaleSets/templates/arm/OSDiskIOPSConsumedPercentage_55dc79f4-5666-420f-8c53-141d73e01fee.json
new file mode 100644
index 000000000..184f32dac
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/OSDiskIOPSConsumedPercentage_55dc79f4-5666-420f-8c53-141d73e01fee.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of operating system disk I/Os consumed per minute",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OS Disk IOPS Consumed Percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/OutboundFlows_d336cfa2-724e-419a-809d-c716741d5279.json b/services/Compute/virtualMachineScaleSets/templates/arm/OutboundFlows_d336cfa2-724e-419a-809d-c716741d5279.json
new file mode 100644
index 000000000..20a010862
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/OutboundFlows_d336cfa2-724e-419a-809d-c716741d5279.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Outbound Flows are number of current flows in the outbound direction (traffic going out of the VM)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Outbound Flows",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/PercentageCPU_310c2a27-8933-434e-a366-cb35831cde44.json b/services/Compute/virtualMachineScaleSets/templates/arm/PercentageCPU_310c2a27-8933-434e-a366-cb35831cde44.json
new file mode 100644
index 000000000..1e06a7381
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/PercentageCPU_310c2a27-8933-434e-a366-cb35831cde44.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of allocated compute units that are currently in use by the Virtual Machine(s)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Percentage CPU",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/arm/VmAvailabilityMetric_6cf11f1e-273a-4f42-bf9b-9310b26c1c4f.json b/services/Compute/virtualMachineScaleSets/templates/arm/VmAvailabilityMetric_6cf11f1e-273a-4f42-bf9b-9310b26c1c4f.json
new file mode 100644
index 000000000..b13cadae9
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/arm/VmAvailabilityMetric_6cf11f1e-273a-4f42-bf9b-9310b26c1c4f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Measure of Availability of Virtual machines over time.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VmAvailabilityMetric",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/AvailableMemoryBytes_d9089d09-ddec-4f6a-8dc1-e2544e5765cb.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/AvailableMemoryBytes_d9089d09-ddec-4f6a-8dc1-e2544e5765cb.bicep
new file mode 100644
index 000000000..1505cb214
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/AvailableMemoryBytes_d9089d09-ddec-4f6a-8dc1-e2544e5765cb.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Amount of physical memory, in bytes, immediately available for allocation to a process or for system use in the Virtual Machine'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Available Memory Bytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/DataDiskIOPSConsumedPercentage_a8c08a0f-fcd7-4b97-8a6e-06b34bac0b9f.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/DataDiskIOPSConsumedPercentage_a8c08a0f-fcd7-4b97-8a6e-06b34bac0b9f.bicep
new file mode 100644
index 000000000..d8e90b32e
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/DataDiskIOPSConsumedPercentage_a8c08a0f-fcd7-4b97-8a6e-06b34bac0b9f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of data disk I/Os consumed per minute'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Data Disk IOPS Consumed Percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/DiskReadOperationsSec_ea8be16a-f5e9-4a8b-a1df-a8c5efff039b.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/DiskReadOperationsSec_ea8be16a-f5e9-4a8b-a1df-a8c5efff039b.bicep
new file mode 100644
index 000000000..8437165fc
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/DiskReadOperationsSec_ea8be16a-f5e9-4a8b-a1df-a8c5efff039b.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Disk Read IOPS'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterOrLessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'Disk Read Operations/Sec'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/DiskWriteOperationsSec_dce1cda8-1dab-4941-b607-1d5d449709d5.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/DiskWriteOperationsSec_dce1cda8-1dab-4941-b607-1d5d449709d5.bicep
new file mode 100644
index 000000000..886a66205
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/DiskWriteOperationsSec_dce1cda8-1dab-4941-b607-1d5d449709d5.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Disk Write IOPS'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterOrLessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'Disk Write Operations/Sec'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/InboundFlows_86991e6e-efc9-4898-adf8-4e8e3a60c57e.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/InboundFlows_86991e6e-efc9-4898-adf8-4e8e3a60c57e.bicep
new file mode 100644
index 000000000..4a8a29c06
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/InboundFlows_86991e6e-efc9-4898-adf8-4e8e3a60c57e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Inbound Flows are number of current flows in the inbound direction (traffic going into the VM)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Inbound Flows'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/NetworkInTotal_f0e94112-5509-47b6-8def-91fb5ca5d0cd.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/NetworkInTotal_f0e94112-5509-47b6-8def-91fb5ca5d0cd.bicep
new file mode 100644
index 000000000..3a64e570c
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/NetworkInTotal_f0e94112-5509-47b6-8def-91fb5ca5d0cd.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of bytes received on all network interfaces by the Virtual Machine(s) (Incoming Traffic)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 700000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Network In Total'
+ dimensions: [
+ {
+ name: 'vmname'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/NetworkIn_87dfe717-217f-4447-b59a-7ea39160b83a.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/NetworkIn_87dfe717-217f-4447-b59a-7ea39160b83a.bicep
new file mode 100644
index 000000000..1ce1f2e60
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/NetworkIn_87dfe717-217f-4447-b59a-7ea39160b83a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of billable bytes received on all network interfaces by the Virtual Machine(s) (Incoming Traffic) (Deprecated)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Network In'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/NetworkOutTotal_98de2aed-3493-4e65-919b-b1f8e6995819.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/NetworkOutTotal_98de2aed-3493-4e65-919b-b1f8e6995819.bicep
new file mode 100644
index 000000000..641ba5791
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/NetworkOutTotal_98de2aed-3493-4e65-919b-b1f8e6995819.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of bytes out on all network interfaces by the Virtual Machine(s) (Outgoing Traffic)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 700000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Network Out Total'
+ dimensions: [
+ {
+ name: 'vmname'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/OSDiskIOPSConsumedPercentage_55dc79f4-5666-420f-8c53-141d73e01fee.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/OSDiskIOPSConsumedPercentage_55dc79f4-5666-420f-8c53-141d73e01fee.bicep
new file mode 100644
index 000000000..987675ae5
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/OSDiskIOPSConsumedPercentage_55dc79f4-5666-420f-8c53-141d73e01fee.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of operating system disk I/Os consumed per minute'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OS Disk IOPS Consumed Percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/OutboundFlows_d336cfa2-724e-419a-809d-c716741d5279.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/OutboundFlows_d336cfa2-724e-419a-809d-c716741d5279.bicep
new file mode 100644
index 000000000..0d346fc06
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/OutboundFlows_d336cfa2-724e-419a-809d-c716741d5279.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Outbound Flows are number of current flows in the outbound direction (traffic going out of the VM)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Outbound Flows'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/PercentageCPU_310c2a27-8933-434e-a366-cb35831cde44.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/PercentageCPU_310c2a27-8933-434e-a366-cb35831cde44.bicep
new file mode 100644
index 000000000..8d024cd43
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/PercentageCPU_310c2a27-8933-434e-a366-cb35831cde44.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of allocated compute units that are currently in use by the Virtual Machine(s)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Percentage CPU'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachineScaleSets/templates/bicep/VmAvailabilityMetric_6cf11f1e-273a-4f42-bf9b-9310b26c1c4f.bicep b/services/Compute/virtualMachineScaleSets/templates/bicep/VmAvailabilityMetric_6cf11f1e-273a-4f42-bf9b-9310b26c1c4f.bicep
new file mode 100644
index 000000000..549415f82
--- /dev/null
+++ b/services/Compute/virtualMachineScaleSets/templates/bicep/VmAvailabilityMetric_6cf11f1e-273a-4f42-bf9b-9310b26c1c4f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Measure of Availability of Virtual machines over time.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VmAvailabilityMetric'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/Deploy-VM-DataDiskSpace-Alert.json b/services/Compute/virtualMachines/Deploy-VM-DataDiskSpace-Alert.json
index 226d5fa74..bf87cbef1 100644
--- a/services/Compute/virtualMachines/Deploy-VM-DataDiskSpace-Alert.json
+++ b/services/Compute/virtualMachines/Deploy-VM-DataDiskSpace-Alert.json
@@ -8,7 +8,7 @@
"displayName": "Deploy VM Data Disk Space Alert",
"description": "Policy to audit/deploy VM data Disk Space Alert",
"metadata": {
- "version": "1.4.0",
+ "version": "1.5.0",
"category": "Compute",
"source": "https://github.com/Azure/azure-monitor-baseline-alerts/",
"alzCloudEnvironments": [
diff --git a/services/Compute/virtualMachines/templates/arm/AvailableMemoryBytes_bf1e0006-6089-4f92-a115-fc83aa0fbdd5.json b/services/Compute/virtualMachines/templates/arm/AvailableMemoryBytes_bf1e0006-6089-4f92-a115-fc83aa0fbdd5.json
new file mode 100644
index 000000000..4b3a7ced7
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/AvailableMemoryBytes_bf1e0006-6089-4f92-a115-fc83aa0fbdd5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Amount of physical memory, in bytes, immediately available for allocation to a process or for system use in the Virtual Machine",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Available Memory Bytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/AvailableMemoryPercentage_69912da3-8d8d-4d57-884a-97c2bdd03bdd.json b/services/Compute/virtualMachines/templates/arm/AvailableMemoryPercentage_69912da3-8d8d-4d57-884a-97c2bdd03bdd.json
new file mode 100644
index 000000000..b7595b42c
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/AvailableMemoryPercentage_69912da3-8d8d-4d57-884a-97c2bdd03bdd.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine Available Memory Percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "InsightsMetrics | where Origin == \"vm.azm.ms\" | where Namespace == \"Memory\" and Name == \"AvailableMB\" | extend TotalMemory = toreal(todynamic(Tags)[\"vm.azm.ms/memorySizeMB\"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0 | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/CPUCreditsConsumed_a407ae10-6263-449c-81b9-172760d6dc6d.json b/services/Compute/virtualMachines/templates/arm/CPUCreditsConsumed_a407ae10-6263-449c-81b9-172760d6dc6d.json
new file mode 100644
index 000000000..9b4d742ab
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/CPUCreditsConsumed_a407ae10-6263-449c-81b9-172760d6dc6d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of credits consumed by the Virtual Machine. Only available on B-series burstable VMs",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CPU Credits Consumed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/CPUCreditsRemaining_821888a1-6490-4a2d-8850-bdc45057a853.json b/services/Compute/virtualMachines/templates/arm/CPUCreditsRemaining_821888a1-6490-4a2d-8850-bdc45057a853.json
new file mode 100644
index 000000000..ba2c51b1f
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/CPUCreditsRemaining_821888a1-6490-4a2d-8850-bdc45057a853.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of credits available to burst. Only available on B-series burstable VMs",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CPU Credits Remaining",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DataDiskBandwidthConsumedPercentage_b57b0749-f851-4c3d-b7fb-7cf26f3bf16a.json b/services/Compute/virtualMachines/templates/arm/DataDiskBandwidthConsumedPercentage_b57b0749-f851-4c3d-b7fb-7cf26f3bf16a.json
new file mode 100644
index 000000000..c0a0c9bb1
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DataDiskBandwidthConsumedPercentage_b57b0749-f851-4c3d-b7fb-7cf26f3bf16a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of data disk bandwidth consumed per minute. Only available on VM series that support premium storage.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Data Disk Bandwidth Consumed Percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DataDiskFreeSpacePercentage_5dbf3a3d-7f08-4deb-a153-129c3485da84.json b/services/Compute/virtualMachines/templates/arm/DataDiskFreeSpacePercentage_5dbf3a3d-7f08-4deb-a153-129c3485da84.json
new file mode 100644
index 000000000..5269ea9e1
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DataDiskFreeSpacePercentage_5dbf3a3d-7f08-4deb-a153-129c3485da84.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine Data Disk Free Space Percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "InsightsMetrics | where Origin == \"vm.azm.ms\" | where Namespace == \"LogicalDisk\"and Name == \"FreeSpacePercentage\" | extend Disk=tostring(todynamic(Tags)[\"vm.azm.ms/mountId\"]) | where Disk !in ('C:','/') | summarize AggregatedValue = avg(Val) by bin(TimeGenerated,15m), Computer, _ResourceId, Disk ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}, {"name": "Disk", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DataDiskIOPSConsumedPercentage_b0cbb9f8-cc67-4e7d-95a8-5a058c6de7e0.json b/services/Compute/virtualMachines/templates/arm/DataDiskIOPSConsumedPercentage_b0cbb9f8-cc67-4e7d-95a8-5a058c6de7e0.json
new file mode 100644
index 000000000..cbcbc9f49
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DataDiskIOPSConsumedPercentage_b0cbb9f8-cc67-4e7d-95a8-5a058c6de7e0.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of data disk I/Os consumed per minute. Only available on VM series that support premium storage.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Data Disk IOPS Consumed Percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DataDiskMaxBurstIOPS_9b0f41af-1c52-4890-a23a-3bfebfee1154.json b/services/Compute/virtualMachines/templates/arm/DataDiskMaxBurstIOPS_9b0f41af-1c52-4890-a23a-3bfebfee1154.json
new file mode 100644
index 000000000..f003e9889
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DataDiskMaxBurstIOPS_9b0f41af-1c52-4890-a23a-3bfebfee1154.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Maximum IOPS Data Disk can achieve with bursting",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "3750",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Data Disk Max Burst IOPS",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DataDiskQueueDepth_040bc9c3-da5c-4fd0-b160-979ce89364ae.json b/services/Compute/virtualMachines/templates/arm/DataDiskQueueDepth_040bc9c3-da5c-4fd0-b160-979ce89364ae.json
new file mode 100644
index 000000000..193bfef45
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DataDiskQueueDepth_040bc9c3-da5c-4fd0-b160-979ce89364ae.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Data Disk Queue Depth(or Queue Length)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Data Disk Queue Depth",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DataDiskReadLatencyms_abddd643-e7c7-411c-b13a-64fdbb406cc8.json b/services/Compute/virtualMachines/templates/arm/DataDiskReadLatencyms_abddd643-e7c7-411c-b13a-64fdbb406cc8.json
new file mode 100644
index 000000000..34c84b60d
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DataDiskReadLatencyms_abddd643-e7c7-411c-b13a-64fdbb406cc8.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine Data Disk Read Latency (ms)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "InsightsMetrics | where Origin == \"vm.azm.ms\" | where Namespace == \"LogicalDisk\" and Name == \"ReadLatencyMs\" | extend Disk=tostring(todynamic(Tags)[\"vm.azm.ms/mountId\"]) | where Disk !in ('C:','/') | summarize AggregatedValue = avg(Val) by bin(TimeGenerated,15m), Computer, _ResourceId, Disk ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "30",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}, {"name": "Disk", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DataDiskReadOperationsSec_3c5518ea-9a0f-44ff-b197-47b3d6db060b.json b/services/Compute/virtualMachines/templates/arm/DataDiskReadOperationsSec_3c5518ea-9a0f-44ff-b197-47b3d6db060b.json
new file mode 100644
index 000000000..c0138ef95
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DataDiskReadOperationsSec_3c5518ea-9a0f-44ff-b197-47b3d6db060b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Read IOPS from a single disk during monitoring period",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Data Disk Read Operations/Sec",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DataDiskWriteBytessec_e45d685d-14c4-4422-8096-6f11d628fb20.json b/services/Compute/virtualMachines/templates/arm/DataDiskWriteBytessec_e45d685d-14c4-4422-8096-6f11d628fb20.json
new file mode 100644
index 000000000..62f857291
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DataDiskWriteBytessec_e45d685d-14c4-4422-8096-6f11d628fb20.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Bytes/Sec written to a single disk during monitoring period",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Data Disk Write Bytes/sec",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DataDiskWriteLatencyms_5c51e187-5b5d-428d-98d8-fb9ab4fea646.json b/services/Compute/virtualMachines/templates/arm/DataDiskWriteLatencyms_5c51e187-5b5d-428d-98d8-fb9ab4fea646.json
new file mode 100644
index 000000000..88466502a
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DataDiskWriteLatencyms_5c51e187-5b5d-428d-98d8-fb9ab4fea646.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine Data Disk Write Latency (ms)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "InsightsMetrics | where Origin == \"vm.azm.ms\" | where Namespace == \"LogicalDisk\" and Name == \"WriteLatencyMs\" | extend Disk=tostring(todynamic(Tags)[\"vm.azm.ms/mountId\"]) | where Disk !in ('C:','/') | summarize AggregatedValue = avg(Val) by bin(TimeGenerated,15m), Computer, _ResourceId, Disk ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "30",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}, {"name": "Disk", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DataDiskWriteOperationsSec_326b359d-e0a2-4055-8e1f-f9c5f9df5599.json b/services/Compute/virtualMachines/templates/arm/DataDiskWriteOperationsSec_326b359d-e0a2-4055-8e1f-f9c5f9df5599.json
new file mode 100644
index 000000000..be585785e
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DataDiskWriteOperationsSec_326b359d-e0a2-4055-8e1f-f9c5f9df5599.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Write IOPS from a single disk during monitoring period",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "50",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Data Disk Write Operations/Sec",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DiskReadBytes_b9221998-f2bb-4ae8-b2c8-f9c4750e06f7.json b/services/Compute/virtualMachines/templates/arm/DiskReadBytes_b9221998-f2bb-4ae8-b2c8-f9c4750e06f7.json
new file mode 100644
index 000000000..adb94865f
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DiskReadBytes_b9221998-f2bb-4ae8-b2c8-f9c4750e06f7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Bytes read from disk during monitoring period",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "4000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Disk Read Bytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DiskReadOperationsSec_8bc489c0-d2f7-43c1-9bb7-478c9503fb2e.json b/services/Compute/virtualMachines/templates/arm/DiskReadOperationsSec_8bc489c0-d2f7-43c1-9bb7-478c9503fb2e.json
new file mode 100644
index 000000000..d487e080a
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DiskReadOperationsSec_8bc489c0-d2f7-43c1-9bb7-478c9503fb2e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Disk Read IOPS",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "400",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Disk Read Operations/Sec",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DiskWriteBytes_b1cc650c-24fe-4f9e-a2ec-5757816526c0.json b/services/Compute/virtualMachines/templates/arm/DiskWriteBytes_b1cc650c-24fe-4f9e-a2ec-5757816526c0.json
new file mode 100644
index 000000000..09c762f02
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DiskWriteBytes_b1cc650c-24fe-4f9e-a2ec-5757816526c0.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Bytes written to disk during monitoring period",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "3500000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Disk Write Bytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/DiskWriteOperationsSec_edff41cb-d9b8-46ba-ba39-42747c1a4c4b.json b/services/Compute/virtualMachines/templates/arm/DiskWriteOperationsSec_edff41cb-d9b8-46ba-ba39-42747c1a4c4b.json
new file mode 100644
index 000000000..2ec99daf8
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/DiskWriteOperationsSec_edff41cb-d9b8-46ba-ba39-42747c1a4c4b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Disk Write IOPS",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Disk Write Operations/Sec",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/Heartbeat_b3a5f580-77a6-4161-9a1e-7370ce783e67.json b/services/Compute/virtualMachines/templates/arm/Heartbeat_b3a5f580-77a6-4161-9a1e-7370ce783e67.json
new file mode 100644
index 000000000..788598e9c
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/Heartbeat_b3a5f580-77a6-4161-9a1e-7370ce783e67.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine Heartbeat",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "Heartbeat | summarize TimeGenerated=max(TimeGenerated) by Computer, _ResourceId | extend Duration = datetime_diff('minute',now(),TimeGenerated) | summarize AggregatedValue = min(Duration) by Computer, bin(TimeGenerated,5m), _ResourceId ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}, {"name": "Disk", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/InboundFlows_6de4e570-4270-4e9b-949e-5680b061e7fd.json b/services/Compute/virtualMachines/templates/arm/InboundFlows_6de4e570-4270-4e9b-949e-5680b061e7fd.json
new file mode 100644
index 000000000..935ca2eee
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/InboundFlows_6de4e570-4270-4e9b-949e-5680b061e7fd.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Inbound Flows are number of current flows in the inbound direction (traffic going into the VM)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Inbound Flows",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/NetworkInTotal_ea4501a3-1e77-4df1-ab61-3ee28ae529eb.json b/services/Compute/virtualMachines/templates/arm/NetworkInTotal_ea4501a3-1e77-4df1-ab61-3ee28ae529eb.json
new file mode 100644
index 000000000..a7260735c
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/NetworkInTotal_ea4501a3-1e77-4df1-ab61-3ee28ae529eb.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of bytes received on all network interfaces by the Virtual Machine(s) (Incoming Traffic)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "500000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Network In Total",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/NetworkOutTotal_e2028144-b142-445c-b544-3bb438537c8f.json b/services/Compute/virtualMachines/templates/arm/NetworkOutTotal_e2028144-b142-445c-b544-3bb438537c8f.json
new file mode 100644
index 000000000..f6c168d6a
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/NetworkOutTotal_e2028144-b142-445c-b544-3bb438537c8f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of bytes out on all network interfaces by the Virtual Machine(s) (Outgoing Traffic)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "200000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Network Out Total",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/NetworkReadbytessec_b565e73f-71c8-4bb3-a792-903b67775497.json b/services/Compute/virtualMachines/templates/arm/NetworkReadbytessec_b565e73f-71c8-4bb3-a792-903b67775497.json
new file mode 100644
index 000000000..68ae6797e
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/NetworkReadbytessec_b565e73f-71c8-4bb3-a792-903b67775497.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine Network Read (bytes/sec)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "InsightsMetrics | where Origin == \"vm.azm.ms\" | where Namespace == \"Network\" and Name == \"ReadBytesPerSecond\" | extend NetworkInterface=tostring(todynamic(Tags)[\"vm.azm.ms/networkDeviceId\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}, {"name": "Disk", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/NetworkWritebytessec_552ca1f1-d69d-4bc2-b044-19f81b225fd4.json b/services/Compute/virtualMachines/templates/arm/NetworkWritebytessec_552ca1f1-d69d-4bc2-b044-19f81b225fd4.json
new file mode 100644
index 000000000..7d86b09b0
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/NetworkWritebytessec_552ca1f1-d69d-4bc2-b044-19f81b225fd4.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine Network Write (bytes/sec)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "InsightsMetrics | where Origin == \"vm.azm.ms\" | where Namespace == \"Network\" and Name == \"WriteBytesPerSecond\" | extend NetworkInterface=tostring(todynamic(Tags)[\"vm.azm.ms/networkDeviceId\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}, {"name": "Disk", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/OSDiskBandwidthConsumedPercentage_f7e19635-0118-4040-83d5-2f4c2150aef1.json b/services/Compute/virtualMachines/templates/arm/OSDiskBandwidthConsumedPercentage_f7e19635-0118-4040-83d5-2f4c2150aef1.json
new file mode 100644
index 000000000..11b42c682
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/OSDiskBandwidthConsumedPercentage_f7e19635-0118-4040-83d5-2f4c2150aef1.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of operating system disk bandwidth consumed per minute. Only available on VM series that support premium storage.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OS Disk Bandwidth Consumed Percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/OSDiskFreeSpacePercentage_dca7af9f-cad2-4751-a61f-77d92c2ce523.json b/services/Compute/virtualMachines/templates/arm/OSDiskFreeSpacePercentage_dca7af9f-cad2-4751-a61f-77d92c2ce523.json
new file mode 100644
index 000000000..2e1a46879
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/OSDiskFreeSpacePercentage_dca7af9f-cad2-4751-a61f-77d92c2ce523.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine OS Disk Free Space Percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "InsightsMetrics | where Origin == \"vm.azm.ms\" | where Namespace == \"LogicalDisk\" and Name == \"FreeSpacePercentage\" | extend Disk=tostring(todynamic(Tags)[\"vm.azm.ms/mountId\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}, {"name": "Disk", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/OSDiskIOPSConsumedPercentage_a2bf3c43-d327-473b-9204-f77e2a0fe398.json b/services/Compute/virtualMachines/templates/arm/OSDiskIOPSConsumedPercentage_a2bf3c43-d327-473b-9204-f77e2a0fe398.json
new file mode 100644
index 000000000..a9a39613f
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/OSDiskIOPSConsumedPercentage_a2bf3c43-d327-473b-9204-f77e2a0fe398.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of operating system disk I/Os consumed per minute. Only available on VM series that support premium storage.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OS Disk IOPS Consumed Percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/OSDiskMaxBurstIOPS_916dc60b-b2d2-4708-9fa4-6a36b244f499.json b/services/Compute/virtualMachines/templates/arm/OSDiskMaxBurstIOPS_916dc60b-b2d2-4708-9fa4-6a36b244f499.json
new file mode 100644
index 000000000..6ba361bf3
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/OSDiskMaxBurstIOPS_916dc60b-b2d2-4708-9fa4-6a36b244f499.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Maximum IOPS OS Disk can achieve with bursting",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "3500",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OS Disk Max Burst IOPS",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/OSDiskQueueDepth_36262245-4c8a-4143-9ab4-68e9c23ae19a.json b/services/Compute/virtualMachines/templates/arm/OSDiskQueueDepth_36262245-4c8a-4143-9ab4-68e9c23ae19a.json
new file mode 100644
index 000000000..26e00e231
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/OSDiskQueueDepth_36262245-4c8a-4143-9ab4-68e9c23ae19a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "OS Disk Queue Depth(or Queue Length)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OS Disk Queue Depth",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/OSDiskReadLatencyms_299ce963-728a-48c8-8b7d-e05b5f8a8f38.json b/services/Compute/virtualMachines/templates/arm/OSDiskReadLatencyms_299ce963-728a-48c8-8b7d-e05b5f8a8f38.json
new file mode 100644
index 000000000..2240ffcf8
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/OSDiskReadLatencyms_299ce963-728a-48c8-8b7d-e05b5f8a8f38.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine Data OS Read Latency (ms)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "InsightsMetrics | where Origin == \"vm.azm.ms\" | where Namespace == \"LogicalDisk\" and Name == \"ReadLatencyMs\" | extend Disk=tostring(todynamic(Tags)[\"vm.azm.ms/mountId\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "30",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}, {"name": "Disk", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/OSDiskWriteBytessec_929b095e-5ea1-48b4-bf4e-bfc1a941a908.json b/services/Compute/virtualMachines/templates/arm/OSDiskWriteBytessec_929b095e-5ea1-48b4-bf4e-bfc1a941a908.json
new file mode 100644
index 000000000..1d1b5de21
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/OSDiskWriteBytessec_929b095e-5ea1-48b4-bf4e-bfc1a941a908.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Bytes/Sec written to a single disk during monitoring period for OS disk",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "48000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OS Disk Write Bytes/sec",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/OSDiskWriteLatencyms_37d9da12-88e6-4c01-8772-384920d34458.json b/services/Compute/virtualMachines/templates/arm/OSDiskWriteLatencyms_37d9da12-88e6-4c01-8772-384920d34458.json
new file mode 100644
index 000000000..021e217d6
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/OSDiskWriteLatencyms_37d9da12-88e6-4c01-8772-384920d34458.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine OS Disk Write Latency (ms)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "InsightsMetrics| where Origin == \"vm.azm.ms\" | where Namespace == \"LogicalDisk\" and Name == \"WriteLatencyMs\" | extend Disk=tostring(todynamic(Tags)[\"vm.azm.ms/mountId\"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "50",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}, {"name": "Disk", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/OSDiskWriteOperationsSec_3be4037a-c692-402d-843d-b3fe43053edf.json b/services/Compute/virtualMachines/templates/arm/OSDiskWriteOperationsSec_3be4037a-c692-402d-843d-b3fe43053edf.json
new file mode 100644
index 000000000..4213eac4e
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/OSDiskWriteOperationsSec_3be4037a-c692-402d-843d-b3fe43053edf.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Write IOPS from a single disk during monitoring period for OS disk",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "200",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OS Disk Write Operations/Sec",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/OutboundFlows_a477bf96-4b0f-471c-b5d3-0acdb59612e6.json b/services/Compute/virtualMachines/templates/arm/OutboundFlows_a477bf96-4b0f-471c-b5d3-0acdb59612e6.json
new file mode 100644
index 000000000..20a010862
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/OutboundFlows_a477bf96-4b0f-471c-b5d3-0acdb59612e6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Outbound Flows are number of current flows in the outbound direction (traffic going out of the VM)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Outbound Flows",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/PercentageCPU_a9bac9fd-2382-4ce1-b68b-8898caf45038.json b/services/Compute/virtualMachines/templates/arm/PercentageCPU_a9bac9fd-2382-4ce1-b68b-8898caf45038.json
new file mode 100644
index 000000000..a90ff5d7a
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/PercentageCPU_a9bac9fd-2382-4ce1-b68b-8898caf45038.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of allocated compute units that are currently in use by the Virtual Machine(s)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Percentage CPU",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/ProcessorUtilizationPercentage_56d57b79-b7c3-4a17-a96b-3fc7152d9c5c.json b/services/Compute/virtualMachines/templates/arm/ProcessorUtilizationPercentage_56d57b79-b7c3-4a17-a96b-3fc7152d9c5c.json
new file mode 100644
index 000000000..e467eb2c3
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/ProcessorUtilizationPercentage_56d57b79-b7c3-4a17-a96b-3fc7152d9c5c.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log Alert for Virtual Machine Processor Utilization Percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "InsightsMetrics | where Origin == \"vm.azm.ms\" | where Namespace == \"Processor\" and Name == \"UtilizationPercentage\" | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "AggregatedValue",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "85",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "Computer", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/VMCachedBandwidthConsumedPercentage_eb85f15b-b705-418f-b8ed-93d8cc7a9a6c.json b/services/Compute/virtualMachines/templates/arm/VMCachedBandwidthConsumedPercentage_eb85f15b-b705-418f-b8ed-93d8cc7a9a6c.json
new file mode 100644
index 000000000..6fc03afe4
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/VMCachedBandwidthConsumedPercentage_eb85f15b-b705-418f-b8ed-93d8cc7a9a6c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of cached disk bandwidth consumed by the VM. Only available on VM series that support premium storage.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VM Cached Bandwidth Consumed Percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/VMCachedIOPSConsumedPercentage_c878115f-2a89-446e-8980-ef4f152120c5.json b/services/Compute/virtualMachines/templates/arm/VMCachedIOPSConsumedPercentage_c878115f-2a89-446e-8980-ef4f152120c5.json
new file mode 100644
index 000000000..791cb34c7
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/VMCachedIOPSConsumedPercentage_c878115f-2a89-446e-8980-ef4f152120c5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of cached disk IOPS consumed by the VM. Only available on VM series that support premium storage.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VM Cached IOPS Consumed Percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/VMUncachedBandwidthConsumedPercentage_e3981e7b-fd8b-4e07-bb68-d598c020c12d.json b/services/Compute/virtualMachines/templates/arm/VMUncachedBandwidthConsumedPercentage_e3981e7b-fd8b-4e07-bb68-d598c020c12d.json
new file mode 100644
index 000000000..b8db6f677
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/VMUncachedBandwidthConsumedPercentage_e3981e7b-fd8b-4e07-bb68-d598c020c12d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of uncached disk bandwidth consumed by the VM. Only available on VM series that support premium storage.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VM Uncached Bandwidth Consumed Percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/VMUncachedIOPSConsumedPercentage_765ceb5b-ec1d-44d7-b94d-bb139030df81.json b/services/Compute/virtualMachines/templates/arm/VMUncachedIOPSConsumedPercentage_765ceb5b-ec1d-44d7-b94d-bb139030df81.json
new file mode 100644
index 000000000..41ff451bc
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/VMUncachedIOPSConsumedPercentage_765ceb5b-ec1d-44d7-b94d-bb139030df81.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of uncached disk IOPS consumed by the VM. Only available on VM series that support premium storage.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VM Uncached IOPS Consumed Percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/arm/VmAvailabilityMetric_3fa5376a-705a-48e4-b314-6282a74c9f7c.json b/services/Compute/virtualMachines/templates/arm/VmAvailabilityMetric_3fa5376a-705a-48e4-b314-6282a74c9f7c.json
new file mode 100644
index 000000000..b433d54f1
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/arm/VmAvailabilityMetric_3fa5376a-705a-48e4-b314-6282a74c9f7c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Measure of Availability of Virtual machines over time.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VmAvailabilityMetric",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/AvailableMemoryBytes_bf1e0006-6089-4f92-a115-fc83aa0fbdd5.bicep b/services/Compute/virtualMachines/templates/bicep/AvailableMemoryBytes_bf1e0006-6089-4f92-a115-fc83aa0fbdd5.bicep
new file mode 100644
index 000000000..85bf09148
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/AvailableMemoryBytes_bf1e0006-6089-4f92-a115-fc83aa0fbdd5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Amount of physical memory, in bytes, immediately available for allocation to a process or for system use in the Virtual Machine'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Available Memory Bytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/AvailableMemoryPercentage_69912da3-8d8d-4d57-884a-97c2bdd03bdd.bicep b/services/Compute/virtualMachines/templates/bicep/AvailableMemoryPercentage_69912da3-8d8d-4d57-884a-97c2bdd03bdd.bicep
new file mode 100644
index 000000000..eea463bf2
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/AvailableMemoryPercentage_69912da3-8d8d-4d57-884a-97c2bdd03bdd.bicep
@@ -0,0 +1,173 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine Available Memory Percentage'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'InsightsMetrics | where Origin == "vm.azm.ms" | where Namespace == "Memory" and Name == "AvailableMB" | extend TotalMemory = toreal(todynamic(Tags)["vm.azm.ms/memorySizeMB"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0 | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/CPUCreditsConsumed_a407ae10-6263-449c-81b9-172760d6dc6d.bicep b/services/Compute/virtualMachines/templates/bicep/CPUCreditsConsumed_a407ae10-6263-449c-81b9-172760d6dc6d.bicep
new file mode 100644
index 000000000..1fbe60a77
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/CPUCreditsConsumed_a407ae10-6263-449c-81b9-172760d6dc6d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of credits consumed by the Virtual Machine. Only available on B-series burstable VMs'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CPU Credits Consumed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/CPUCreditsRemaining_821888a1-6490-4a2d-8850-bdc45057a853.bicep b/services/Compute/virtualMachines/templates/bicep/CPUCreditsRemaining_821888a1-6490-4a2d-8850-bdc45057a853.bicep
new file mode 100644
index 000000000..640211704
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/CPUCreditsRemaining_821888a1-6490-4a2d-8850-bdc45057a853.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of credits available to burst. Only available on B-series burstable VMs'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CPU Credits Remaining'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DataDiskBandwidthConsumedPercentage_b57b0749-f851-4c3d-b7fb-7cf26f3bf16a.bicep b/services/Compute/virtualMachines/templates/bicep/DataDiskBandwidthConsumedPercentage_b57b0749-f851-4c3d-b7fb-7cf26f3bf16a.bicep
new file mode 100644
index 000000000..e15ff9297
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DataDiskBandwidthConsumedPercentage_b57b0749-f851-4c3d-b7fb-7cf26f3bf16a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of data disk bandwidth consumed per minute. Only available on VM series that support premium storage.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Data Disk Bandwidth Consumed Percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DataDiskFreeSpacePercentage_5dbf3a3d-7f08-4deb-a153-129c3485da84.bicep b/services/Compute/virtualMachines/templates/bicep/DataDiskFreeSpacePercentage_5dbf3a3d-7f08-4deb-a153-129c3485da84.bicep
new file mode 100644
index 000000000..df6806016
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DataDiskFreeSpacePercentage_5dbf3a3d-7f08-4deb-a153-129c3485da84.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine Data Disk Free Space Percentage'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'InsightsMetrics | where Origin == "vm.azm.ms" | where Namespace == "LogicalDisk"and Name == "FreeSpacePercentage" | extend Disk=tostring(todynamic(Tags)["vm.azm.ms/mountId"]) | where Disk !in (\'C:\',\'/\') | summarize AggregatedValue = avg(Val) by bin(TimeGenerated,15m), Computer, _ResourceId, Disk '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'Disk'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DataDiskIOPSConsumedPercentage_b0cbb9f8-cc67-4e7d-95a8-5a058c6de7e0.bicep b/services/Compute/virtualMachines/templates/bicep/DataDiskIOPSConsumedPercentage_b0cbb9f8-cc67-4e7d-95a8-5a058c6de7e0.bicep
new file mode 100644
index 000000000..229d6a198
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DataDiskIOPSConsumedPercentage_b0cbb9f8-cc67-4e7d-95a8-5a058c6de7e0.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of data disk I/Os consumed per minute. Only available on VM series that support premium storage.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Data Disk IOPS Consumed Percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DataDiskMaxBurstIOPS_9b0f41af-1c52-4890-a23a-3bfebfee1154.bicep b/services/Compute/virtualMachines/templates/bicep/DataDiskMaxBurstIOPS_9b0f41af-1c52-4890-a23a-3bfebfee1154.bicep
new file mode 100644
index 000000000..3ea158408
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DataDiskMaxBurstIOPS_9b0f41af-1c52-4890-a23a-3bfebfee1154.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Maximum IOPS Data Disk can achieve with bursting'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 3750
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Data Disk Max Burst IOPS'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DataDiskQueueDepth_040bc9c3-da5c-4fd0-b160-979ce89364ae.bicep b/services/Compute/virtualMachines/templates/bicep/DataDiskQueueDepth_040bc9c3-da5c-4fd0-b160-979ce89364ae.bicep
new file mode 100644
index 000000000..8319e57c6
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DataDiskQueueDepth_040bc9c3-da5c-4fd0-b160-979ce89364ae.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Data Disk Queue Depth(or Queue Length)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Data Disk Queue Depth'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DataDiskReadLatencyms_abddd643-e7c7-411c-b13a-64fdbb406cc8.bicep b/services/Compute/virtualMachines/templates/bicep/DataDiskReadLatencyms_abddd643-e7c7-411c-b13a-64fdbb406cc8.bicep
new file mode 100644
index 000000000..6d8cce3d2
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DataDiskReadLatencyms_abddd643-e7c7-411c-b13a-64fdbb406cc8.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine Data Disk Read Latency (ms)'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'InsightsMetrics | where Origin == "vm.azm.ms" | where Namespace == "LogicalDisk" and Name == "ReadLatencyMs" | extend Disk=tostring(todynamic(Tags)["vm.azm.ms/mountId"]) | where Disk !in (\'C:\',\'/\') | summarize AggregatedValue = avg(Val) by bin(TimeGenerated,15m), Computer, _ResourceId, Disk '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 30
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'Disk'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DataDiskReadOperationsSec_3c5518ea-9a0f-44ff-b197-47b3d6db060b.bicep b/services/Compute/virtualMachines/templates/bicep/DataDiskReadOperationsSec_3c5518ea-9a0f-44ff-b197-47b3d6db060b.bicep
new file mode 100644
index 000000000..65ab67959
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DataDiskReadOperationsSec_3c5518ea-9a0f-44ff-b197-47b3d6db060b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Read IOPS from a single disk during monitoring period'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Data Disk Read Operations/Sec'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DataDiskWriteBytessec_e45d685d-14c4-4422-8096-6f11d628fb20.bicep b/services/Compute/virtualMachines/templates/bicep/DataDiskWriteBytessec_e45d685d-14c4-4422-8096-6f11d628fb20.bicep
new file mode 100644
index 000000000..77b307729
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DataDiskWriteBytessec_e45d685d-14c4-4422-8096-6f11d628fb20.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Bytes/Sec written to a single disk during monitoring period'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Data Disk Write Bytes/sec'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DataDiskWriteLatencyms_5c51e187-5b5d-428d-98d8-fb9ab4fea646.bicep b/services/Compute/virtualMachines/templates/bicep/DataDiskWriteLatencyms_5c51e187-5b5d-428d-98d8-fb9ab4fea646.bicep
new file mode 100644
index 000000000..bcd634e82
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DataDiskWriteLatencyms_5c51e187-5b5d-428d-98d8-fb9ab4fea646.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine Data Disk Write Latency (ms)'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'InsightsMetrics | where Origin == "vm.azm.ms" | where Namespace == "LogicalDisk" and Name == "WriteLatencyMs" | extend Disk=tostring(todynamic(Tags)["vm.azm.ms/mountId"]) | where Disk !in (\'C:\',\'/\') | summarize AggregatedValue = avg(Val) by bin(TimeGenerated,15m), Computer, _ResourceId, Disk '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 30
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'Disk'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DataDiskWriteOperationsSec_326b359d-e0a2-4055-8e1f-f9c5f9df5599.bicep b/services/Compute/virtualMachines/templates/bicep/DataDiskWriteOperationsSec_326b359d-e0a2-4055-8e1f-f9c5f9df5599.bicep
new file mode 100644
index 000000000..b838f6148
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DataDiskWriteOperationsSec_326b359d-e0a2-4055-8e1f-f9c5f9df5599.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Write IOPS from a single disk during monitoring period'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 50
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Data Disk Write Operations/Sec'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DiskReadBytes_b9221998-f2bb-4ae8-b2c8-f9c4750e06f7.bicep b/services/Compute/virtualMachines/templates/bicep/DiskReadBytes_b9221998-f2bb-4ae8-b2c8-f9c4750e06f7.bicep
new file mode 100644
index 000000000..9e2382c08
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DiskReadBytes_b9221998-f2bb-4ae8-b2c8-f9c4750e06f7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Bytes read from disk during monitoring period'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 4000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Disk Read Bytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DiskReadOperationsSec_8bc489c0-d2f7-43c1-9bb7-478c9503fb2e.bicep b/services/Compute/virtualMachines/templates/bicep/DiskReadOperationsSec_8bc489c0-d2f7-43c1-9bb7-478c9503fb2e.bicep
new file mode 100644
index 000000000..5d552a3fc
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DiskReadOperationsSec_8bc489c0-d2f7-43c1-9bb7-478c9503fb2e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Disk Read IOPS'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 400
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Disk Read Operations/Sec'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DiskWriteBytes_b1cc650c-24fe-4f9e-a2ec-5757816526c0.bicep b/services/Compute/virtualMachines/templates/bicep/DiskWriteBytes_b1cc650c-24fe-4f9e-a2ec-5757816526c0.bicep
new file mode 100644
index 000000000..139e8c0f7
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DiskWriteBytes_b1cc650c-24fe-4f9e-a2ec-5757816526c0.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Bytes written to disk during monitoring period'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 3500000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Disk Write Bytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/DiskWriteOperationsSec_edff41cb-d9b8-46ba-ba39-42747c1a4c4b.bicep b/services/Compute/virtualMachines/templates/bicep/DiskWriteOperationsSec_edff41cb-d9b8-46ba-ba39-42747c1a4c4b.bicep
new file mode 100644
index 000000000..9e4f98b0c
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/DiskWriteOperationsSec_edff41cb-d9b8-46ba-ba39-42747c1a4c4b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Disk Write IOPS'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Disk Write Operations/Sec'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/Heartbeat_b3a5f580-77a6-4161-9a1e-7370ce783e67.bicep b/services/Compute/virtualMachines/templates/bicep/Heartbeat_b3a5f580-77a6-4161-9a1e-7370ce783e67.bicep
new file mode 100644
index 000000000..64df0a63a
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/Heartbeat_b3a5f580-77a6-4161-9a1e-7370ce783e67.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine Heartbeat'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'Heartbeat | summarize TimeGenerated=max(TimeGenerated) by Computer, _ResourceId | extend Duration = datetime_diff(\'minute\',now(),TimeGenerated) | summarize AggregatedValue = min(Duration) by Computer, bin(TimeGenerated,5m), _ResourceId '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'Disk'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/InboundFlows_6de4e570-4270-4e9b-949e-5680b061e7fd.bicep b/services/Compute/virtualMachines/templates/bicep/InboundFlows_6de4e570-4270-4e9b-949e-5680b061e7fd.bicep
new file mode 100644
index 000000000..4a8a29c06
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/InboundFlows_6de4e570-4270-4e9b-949e-5680b061e7fd.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Inbound Flows are number of current flows in the inbound direction (traffic going into the VM)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Inbound Flows'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/NetworkInTotal_ea4501a3-1e77-4df1-ab61-3ee28ae529eb.bicep b/services/Compute/virtualMachines/templates/bicep/NetworkInTotal_ea4501a3-1e77-4df1-ab61-3ee28ae529eb.bicep
new file mode 100644
index 000000000..ba4db5db6
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/NetworkInTotal_ea4501a3-1e77-4df1-ab61-3ee28ae529eb.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of bytes received on all network interfaces by the Virtual Machine(s) (Incoming Traffic)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 500000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Network In Total'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/NetworkOutTotal_e2028144-b142-445c-b544-3bb438537c8f.bicep b/services/Compute/virtualMachines/templates/bicep/NetworkOutTotal_e2028144-b142-445c-b544-3bb438537c8f.bicep
new file mode 100644
index 000000000..1f5af94a7
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/NetworkOutTotal_e2028144-b142-445c-b544-3bb438537c8f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of bytes out on all network interfaces by the Virtual Machine(s) (Outgoing Traffic)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 200000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Network Out Total'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/NetworkReadbytessec_b565e73f-71c8-4bb3-a792-903b67775497.bicep b/services/Compute/virtualMachines/templates/bicep/NetworkReadbytessec_b565e73f-71c8-4bb3-a792-903b67775497.bicep
new file mode 100644
index 000000000..00074b25f
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/NetworkReadbytessec_b565e73f-71c8-4bb3-a792-903b67775497.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine Network Read (bytes/sec)'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'InsightsMetrics | where Origin == "vm.azm.ms" | where Namespace == "Network" and Name == "ReadBytesPerSecond" | extend NetworkInterface=tostring(todynamic(Tags)["vm.azm.ms/networkDeviceId"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10000000
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'Disk'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/NetworkWritebytessec_552ca1f1-d69d-4bc2-b044-19f81b225fd4.bicep b/services/Compute/virtualMachines/templates/bicep/NetworkWritebytessec_552ca1f1-d69d-4bc2-b044-19f81b225fd4.bicep
new file mode 100644
index 000000000..6fd5d1e9b
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/NetworkWritebytessec_552ca1f1-d69d-4bc2-b044-19f81b225fd4.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine Network Write (bytes/sec)'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'InsightsMetrics | where Origin == "vm.azm.ms" | where Namespace == "Network" and Name == "WriteBytesPerSecond" | extend NetworkInterface=tostring(todynamic(Tags)["vm.azm.ms/networkDeviceId"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, NetworkInterface '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10000000
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'Disk'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/OSDiskBandwidthConsumedPercentage_f7e19635-0118-4040-83d5-2f4c2150aef1.bicep b/services/Compute/virtualMachines/templates/bicep/OSDiskBandwidthConsumedPercentage_f7e19635-0118-4040-83d5-2f4c2150aef1.bicep
new file mode 100644
index 000000000..8dcf25dc8
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/OSDiskBandwidthConsumedPercentage_f7e19635-0118-4040-83d5-2f4c2150aef1.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of operating system disk bandwidth consumed per minute. Only available on VM series that support premium storage.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OS Disk Bandwidth Consumed Percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/OSDiskFreeSpacePercentage_dca7af9f-cad2-4751-a61f-77d92c2ce523.bicep b/services/Compute/virtualMachines/templates/bicep/OSDiskFreeSpacePercentage_dca7af9f-cad2-4751-a61f-77d92c2ce523.bicep
new file mode 100644
index 000000000..5b74013fd
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/OSDiskFreeSpacePercentage_dca7af9f-cad2-4751-a61f-77d92c2ce523.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine OS Disk Free Space Percentage'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'InsightsMetrics | where Origin == "vm.azm.ms" | where Namespace == "LogicalDisk" and Name == "FreeSpacePercentage" | extend Disk=tostring(todynamic(Tags)["vm.azm.ms/mountId"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'Disk'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/OSDiskIOPSConsumedPercentage_a2bf3c43-d327-473b-9204-f77e2a0fe398.bicep b/services/Compute/virtualMachines/templates/bicep/OSDiskIOPSConsumedPercentage_a2bf3c43-d327-473b-9204-f77e2a0fe398.bicep
new file mode 100644
index 000000000..764d504ad
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/OSDiskIOPSConsumedPercentage_a2bf3c43-d327-473b-9204-f77e2a0fe398.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of operating system disk I/Os consumed per minute. Only available on VM series that support premium storage.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OS Disk IOPS Consumed Percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/OSDiskMaxBurstIOPS_916dc60b-b2d2-4708-9fa4-6a36b244f499.bicep b/services/Compute/virtualMachines/templates/bicep/OSDiskMaxBurstIOPS_916dc60b-b2d2-4708-9fa4-6a36b244f499.bicep
new file mode 100644
index 000000000..8907d2e24
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/OSDiskMaxBurstIOPS_916dc60b-b2d2-4708-9fa4-6a36b244f499.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Maximum IOPS OS Disk can achieve with bursting'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 3500
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OS Disk Max Burst IOPS'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/OSDiskQueueDepth_36262245-4c8a-4143-9ab4-68e9c23ae19a.bicep b/services/Compute/virtualMachines/templates/bicep/OSDiskQueueDepth_36262245-4c8a-4143-9ab4-68e9c23ae19a.bicep
new file mode 100644
index 000000000..f598cbb9b
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/OSDiskQueueDepth_36262245-4c8a-4143-9ab4-68e9c23ae19a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'OS Disk Queue Depth(or Queue Length)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OS Disk Queue Depth'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/OSDiskReadLatencyms_299ce963-728a-48c8-8b7d-e05b5f8a8f38.bicep b/services/Compute/virtualMachines/templates/bicep/OSDiskReadLatencyms_299ce963-728a-48c8-8b7d-e05b5f8a8f38.bicep
new file mode 100644
index 000000000..6b59fcd6b
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/OSDiskReadLatencyms_299ce963-728a-48c8-8b7d-e05b5f8a8f38.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine Data OS Read Latency (ms)'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'InsightsMetrics | where Origin == "vm.azm.ms" | where Namespace == "LogicalDisk" and Name == "ReadLatencyMs" | extend Disk=tostring(todynamic(Tags)["vm.azm.ms/mountId"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 30
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'Disk'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/OSDiskWriteBytessec_929b095e-5ea1-48b4-bf4e-bfc1a941a908.bicep b/services/Compute/virtualMachines/templates/bicep/OSDiskWriteBytessec_929b095e-5ea1-48b4-bf4e-bfc1a941a908.bicep
new file mode 100644
index 000000000..a02975443
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/OSDiskWriteBytessec_929b095e-5ea1-48b4-bf4e-bfc1a941a908.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Bytes/Sec written to a single disk during monitoring period for OS disk'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 48000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OS Disk Write Bytes/sec'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/OSDiskWriteLatencyms_37d9da12-88e6-4c01-8772-384920d34458.bicep b/services/Compute/virtualMachines/templates/bicep/OSDiskWriteLatencyms_37d9da12-88e6-4c01-8772-384920d34458.bicep
new file mode 100644
index 000000000..94a81f3a3
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/OSDiskWriteLatencyms_37d9da12-88e6-4c01-8772-384920d34458.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine OS Disk Write Latency (ms)'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'InsightsMetrics| where Origin == "vm.azm.ms" | where Namespace == "LogicalDisk" and Name == "WriteLatencyMs" | extend Disk=tostring(todynamic(Tags)["vm.azm.ms/mountId"]) | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId, Disk '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 50
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'Disk'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/OSDiskWriteOperationsSec_3be4037a-c692-402d-843d-b3fe43053edf.bicep b/services/Compute/virtualMachines/templates/bicep/OSDiskWriteOperationsSec_3be4037a-c692-402d-843d-b3fe43053edf.bicep
new file mode 100644
index 000000000..9c882ece5
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/OSDiskWriteOperationsSec_3be4037a-c692-402d-843d-b3fe43053edf.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Write IOPS from a single disk during monitoring period for OS disk'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 200
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OS Disk Write Operations/Sec'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/OutboundFlows_a477bf96-4b0f-471c-b5d3-0acdb59612e6.bicep b/services/Compute/virtualMachines/templates/bicep/OutboundFlows_a477bf96-4b0f-471c-b5d3-0acdb59612e6.bicep
new file mode 100644
index 000000000..0d346fc06
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/OutboundFlows_a477bf96-4b0f-471c-b5d3-0acdb59612e6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Outbound Flows are number of current flows in the outbound direction (traffic going out of the VM)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Outbound Flows'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/PercentageCPU_a9bac9fd-2382-4ce1-b68b-8898caf45038.bicep b/services/Compute/virtualMachines/templates/bicep/PercentageCPU_a9bac9fd-2382-4ce1-b68b-8898caf45038.bicep
new file mode 100644
index 000000000..d57625f22
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/PercentageCPU_a9bac9fd-2382-4ce1-b68b-8898caf45038.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of allocated compute units that are currently in use by the Virtual Machine(s)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Percentage CPU'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/ProcessorUtilizationPercentage_56d57b79-b7c3-4a17-a96b-3fc7152d9c5c.bicep b/services/Compute/virtualMachines/templates/bicep/ProcessorUtilizationPercentage_56d57b79-b7c3-4a17-a96b-3fc7152d9c5c.bicep
new file mode 100644
index 000000000..c61bd1912
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/ProcessorUtilizationPercentage_56d57b79-b7c3-4a17-a96b-3fc7152d9c5c.bicep
@@ -0,0 +1,173 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log Alert for Virtual Machine Processor Utilization Percentage'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'InsightsMetrics | where Origin == "vm.azm.ms" | where Namespace == "Processor" and Name == "UtilizationPercentage" | summarize AggregatedValue = avg(Val) by bin(TimeGenerated, 15m), Computer, _ResourceId '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = 'AggregatedValue'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 85
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'Computer'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/VMCachedBandwidthConsumedPercentage_eb85f15b-b705-418f-b8ed-93d8cc7a9a6c.bicep b/services/Compute/virtualMachines/templates/bicep/VMCachedBandwidthConsumedPercentage_eb85f15b-b705-418f-b8ed-93d8cc7a9a6c.bicep
new file mode 100644
index 000000000..cd5b9d747
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/VMCachedBandwidthConsumedPercentage_eb85f15b-b705-418f-b8ed-93d8cc7a9a6c.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of cached disk bandwidth consumed by the VM. Only available on VM series that support premium storage.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VM Cached Bandwidth Consumed Percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/VMCachedIOPSConsumedPercentage_c878115f-2a89-446e-8980-ef4f152120c5.bicep b/services/Compute/virtualMachines/templates/bicep/VMCachedIOPSConsumedPercentage_c878115f-2a89-446e-8980-ef4f152120c5.bicep
new file mode 100644
index 000000000..ce11b1ac3
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/VMCachedIOPSConsumedPercentage_c878115f-2a89-446e-8980-ef4f152120c5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of cached disk IOPS consumed by the VM. Only available on VM series that support premium storage.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VM Cached IOPS Consumed Percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/VMUncachedBandwidthConsumedPercentage_e3981e7b-fd8b-4e07-bb68-d598c020c12d.bicep b/services/Compute/virtualMachines/templates/bicep/VMUncachedBandwidthConsumedPercentage_e3981e7b-fd8b-4e07-bb68-d598c020c12d.bicep
new file mode 100644
index 000000000..b163843a5
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/VMUncachedBandwidthConsumedPercentage_e3981e7b-fd8b-4e07-bb68-d598c020c12d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of uncached disk bandwidth consumed by the VM. Only available on VM series that support premium storage.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VM Uncached Bandwidth Consumed Percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/VMUncachedIOPSConsumedPercentage_765ceb5b-ec1d-44d7-b94d-bb139030df81.bicep b/services/Compute/virtualMachines/templates/bicep/VMUncachedIOPSConsumedPercentage_765ceb5b-ec1d-44d7-b94d-bb139030df81.bicep
new file mode 100644
index 000000000..0115276f3
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/VMUncachedIOPSConsumedPercentage_765ceb5b-ec1d-44d7-b94d-bb139030df81.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of uncached disk IOPS consumed by the VM. Only available on VM series that support premium storage.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VM Uncached IOPS Consumed Percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Compute/virtualMachines/templates/bicep/VmAvailabilityMetric_3fa5376a-705a-48e4-b314-6282a74c9f7c.bicep b/services/Compute/virtualMachines/templates/bicep/VmAvailabilityMetric_3fa5376a-705a-48e4-b314-6282a74c9f7c.bicep
new file mode 100644
index 000000000..f67cf7e88
--- /dev/null
+++ b/services/Compute/virtualMachines/templates/bicep/VmAvailabilityMetric_3fa5376a-705a-48e4-b314-6282a74c9f7c.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Measure of Availability of Virtual machines over time.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VmAvailabilityMetric'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerInstance/containerGroups/templates/arm/CpuUsage_970af9d6-9212-420d-af7b-4fbd790a2596.json b/services/ContainerInstance/containerGroups/templates/arm/CpuUsage_970af9d6-9212-420d-af7b-4fbd790a2596.json
new file mode 100644
index 000000000..11d7bdf82
--- /dev/null
+++ b/services/ContainerInstance/containerGroups/templates/arm/CpuUsage_970af9d6-9212-420d-af7b-4fbd790a2596.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU usage on all cores in millicores.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "CpuUsage",
+ "dimensions": [{"operator": "include", "name": "containername", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerInstance/containerGroups/templates/arm/MemoryUsage_4758386e-12ee-411a-9e49-445b5c5c3051.json b/services/ContainerInstance/containerGroups/templates/arm/MemoryUsage_4758386e-12ee-411a-9e49-445b5c5c3051.json
new file mode 100644
index 000000000..431874cd9
--- /dev/null
+++ b/services/ContainerInstance/containerGroups/templates/arm/MemoryUsage_4758386e-12ee-411a-9e49-445b5c5c3051.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total memory usage in byte.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "MemoryUsage",
+ "dimensions": [{"operator": "include", "name": "containername", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerInstance/containerGroups/templates/arm/NetworkBytesReceivedPerSecond_8beff742-9cd8-43ed-9680-57ae35bee6e8.json b/services/ContainerInstance/containerGroups/templates/arm/NetworkBytesReceivedPerSecond_8beff742-9cd8-43ed-9680-57ae35bee6e8.json
new file mode 100644
index 000000000..7f7c28ecd
--- /dev/null
+++ b/services/ContainerInstance/containerGroups/templates/arm/NetworkBytesReceivedPerSecond_8beff742-9cd8-43ed-9680-57ae35bee6e8.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The network bytes received per second.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "NetworkBytesReceivedPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerInstance/containerGroups/templates/arm/NetworkBytesTransmittedPerSecond_5b26b965-2662-4a89-9d7e-771486357f39.json b/services/ContainerInstance/containerGroups/templates/arm/NetworkBytesTransmittedPerSecond_5b26b965-2662-4a89-9d7e-771486357f39.json
new file mode 100644
index 000000000..995ce0e99
--- /dev/null
+++ b/services/ContainerInstance/containerGroups/templates/arm/NetworkBytesTransmittedPerSecond_5b26b965-2662-4a89-9d7e-771486357f39.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The network bytes transmitted per second.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "NetworkBytesTransmittedPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerInstance/containerGroups/templates/bicep/CpuUsage_970af9d6-9212-420d-af7b-4fbd790a2596.bicep b/services/ContainerInstance/containerGroups/templates/bicep/CpuUsage_970af9d6-9212-420d-af7b-4fbd790a2596.bicep
new file mode 100644
index 000000000..1e9d595ec
--- /dev/null
+++ b/services/ContainerInstance/containerGroups/templates/bicep/CpuUsage_970af9d6-9212-420d-af7b-4fbd790a2596.bicep
@@ -0,0 +1,152 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU usage on all cores in millicores.'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'CpuUsage'
+ dimensions: [
+ {
+ name: 'containername'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerInstance/containerGroups/templates/bicep/MemoryUsage_4758386e-12ee-411a-9e49-445b5c5c3051.bicep b/services/ContainerInstance/containerGroups/templates/bicep/MemoryUsage_4758386e-12ee-411a-9e49-445b5c5c3051.bicep
new file mode 100644
index 000000000..4b02975cf
--- /dev/null
+++ b/services/ContainerInstance/containerGroups/templates/bicep/MemoryUsage_4758386e-12ee-411a-9e49-445b5c5c3051.bicep
@@ -0,0 +1,152 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total memory usage in byte.'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'MemoryUsage'
+ dimensions: [
+ {
+ name: 'containername'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerInstance/containerGroups/templates/bicep/NetworkBytesReceivedPerSecond_8beff742-9cd8-43ed-9680-57ae35bee6e8.bicep b/services/ContainerInstance/containerGroups/templates/bicep/NetworkBytesReceivedPerSecond_8beff742-9cd8-43ed-9680-57ae35bee6e8.bicep
new file mode 100644
index 000000000..9b2c62289
--- /dev/null
+++ b/services/ContainerInstance/containerGroups/templates/bicep/NetworkBytesReceivedPerSecond_8beff742-9cd8-43ed-9680-57ae35bee6e8.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The network bytes received per second.'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'NetworkBytesReceivedPerSecond'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerInstance/containerGroups/templates/bicep/NetworkBytesTransmittedPerSecond_5b26b965-2662-4a89-9d7e-771486357f39.bicep b/services/ContainerInstance/containerGroups/templates/bicep/NetworkBytesTransmittedPerSecond_5b26b965-2662-4a89-9d7e-771486357f39.bicep
new file mode 100644
index 000000000..546ea0ab9
--- /dev/null
+++ b/services/ContainerInstance/containerGroups/templates/bicep/NetworkBytesTransmittedPerSecond_5b26b965-2662-4a89-9d7e-771486357f39.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The network bytes transmitted per second.'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'NetworkBytesTransmittedPerSecond'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerRegistry/registries/templates/arm/StorageUsed_fa9efde4-3586-4595-a442-b7e97f70fe91.json b/services/ContainerRegistry/registries/templates/arm/StorageUsed_fa9efde4-3586-4595-a442-b7e97f70fe91.json
new file mode 100644
index 000000000..48229bba0
--- /dev/null
+++ b/services/ContainerRegistry/registries/templates/arm/StorageUsed_fa9efde4-3586-4595-a442-b7e97f70fe91.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of storage used by the container registry. For a registry account, it's the sum of capacity used by all the repositories within a registry. It's sum of capacity used by shared layers, manifest files, and replica copies in each of its repositories.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "429496729600",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "StorageUsed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerRegistry/registries/templates/arm/StorageUsedforStandardPricingPlan_42995506-5bd2-4687-9316-d9399919990b.json b/services/ContainerRegistry/registries/templates/arm/StorageUsedforStandardPricingPlan_42995506-5bd2-4687-9316-d9399919990b.json
new file mode 100644
index 000000000..34e0dee7c
--- /dev/null
+++ b/services/ContainerRegistry/registries/templates/arm/StorageUsedforStandardPricingPlan_42995506-5bd2-4687-9316-d9399919990b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of storage used by the standard container registry. For a registry account, it's the sum of capacity used by all the repositories within a registry. It's sum of capacity used by shared layers, manifest files, and replica copies in each of its repositories.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "50000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "StorageUsed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerRegistry/registries/templates/arm/SuccessfulPullCount_b8c8a846-a8d0-4e8f-b854-030955a20135.json b/services/ContainerRegistry/registries/templates/arm/SuccessfulPullCount_b8c8a846-a8d0-4e8f-b854-030955a20135.json
new file mode 100644
index 000000000..de3e916ec
--- /dev/null
+++ b/services/ContainerRegistry/registries/templates/arm/SuccessfulPullCount_b8c8a846-a8d0-4e8f-b854-030955a20135.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of successful image pulls",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "50",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SuccessfulPullCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerRegistry/registries/templates/arm/SuccessfulPushCount_9dca87c2-de00-40fd-b0bb-c8335e5f978a.json b/services/ContainerRegistry/registries/templates/arm/SuccessfulPushCount_9dca87c2-de00-40fd-b0bb-c8335e5f978a.json
new file mode 100644
index 000000000..786875805
--- /dev/null
+++ b/services/ContainerRegistry/registries/templates/arm/SuccessfulPushCount_9dca87c2-de00-40fd-b0bb-c8335e5f978a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of successful image pushes",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SuccessfulPushCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerRegistry/registries/templates/bicep/StorageUsed_fa9efde4-3586-4595-a442-b7e97f70fe91.bicep b/services/ContainerRegistry/registries/templates/bicep/StorageUsed_fa9efde4-3586-4595-a442-b7e97f70fe91.bicep
new file mode 100644
index 000000000..262c081de
--- /dev/null
+++ b/services/ContainerRegistry/registries/templates/bicep/StorageUsed_fa9efde4-3586-4595-a442-b7e97f70fe91.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of storage used by the container registry. For a registry account, it's the sum of capacity used by all the repositories within a registry. It's sum of capacity used by shared layers, manifest files, and replica copies in each of its repositories.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 429496729600
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'StorageUsed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerRegistry/registries/templates/bicep/StorageUsedforStandardPricingPlan_42995506-5bd2-4687-9316-d9399919990b.bicep b/services/ContainerRegistry/registries/templates/bicep/StorageUsedforStandardPricingPlan_42995506-5bd2-4687-9316-d9399919990b.bicep
new file mode 100644
index 000000000..0896332f7
--- /dev/null
+++ b/services/ContainerRegistry/registries/templates/bicep/StorageUsedforStandardPricingPlan_42995506-5bd2-4687-9316-d9399919990b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of storage used by the standard container registry. For a registry account, it's the sum of capacity used by all the repositories within a registry. It's sum of capacity used by shared layers, manifest files, and replica copies in each of its repositories.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 50000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'StorageUsed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerRegistry/registries/templates/bicep/SuccessfulPullCount_b8c8a846-a8d0-4e8f-b854-030955a20135.bicep b/services/ContainerRegistry/registries/templates/bicep/SuccessfulPullCount_b8c8a846-a8d0-4e8f-b854-030955a20135.bicep
new file mode 100644
index 000000000..709f4f9df
--- /dev/null
+++ b/services/ContainerRegistry/registries/templates/bicep/SuccessfulPullCount_b8c8a846-a8d0-4e8f-b854-030955a20135.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of successful image pulls'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 50
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SuccessfulPullCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerRegistry/registries/templates/bicep/SuccessfulPushCount_9dca87c2-de00-40fd-b0bb-c8335e5f978a.bicep b/services/ContainerRegistry/registries/templates/bicep/SuccessfulPushCount_9dca87c2-de00-40fd-b0bb-c8335e5f978a.bicep
new file mode 100644
index 000000000..ab0016cc0
--- /dev/null
+++ b/services/ContainerRegistry/registries/templates/bicep/SuccessfulPushCount_9dca87c2-de00-40fd-b0bb-c8335e5f978a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of successful image pushes'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SuccessfulPushCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/clusterautoscalerclustersafetoautoscale_49fd8bac-d061-459d-8d80-a048c4c8ba56.json b/services/ContainerService/managedClusters/templates/arm/clusterautoscalerclustersafetoautoscale_49fd8bac-d061-459d-8d80-a048c4c8ba56.json
new file mode 100644
index 000000000..d99ad7dbd
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/clusterautoscalerclustersafetoautoscale_49fd8bac-d061-459d-8d80-a048c4c8ba56.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Determines whether or not cluster autoscaler will take action on the cluster",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cluster_autoscaler_cluster_safe_to_autoscale",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/clusterautoscalerunschedulablepodscount_301ca0e3-fc88-4285-be99-a2a587c412f5.json b/services/ContainerService/managedClusters/templates/arm/clusterautoscalerunschedulablepodscount_301ca0e3-fc88-4285-be99-a2a587c412f5.json
new file mode 100644
index 000000000..d01e56323
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/clusterautoscalerunschedulablepodscount_301ca0e3-fc88-4285-be99-a2a587c412f5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of pods that are currently unschedulable in the cluster",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cluster_autoscaler_unschedulable_pods_count",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/kubenodestatusallocatablecpucores_64a872f9-5ec6-4121-acad-edd12f4c3466.json b/services/ContainerService/managedClusters/templates/arm/kubenodestatusallocatablecpucores_64a872f9-5ec6-4121-acad-edd12f4c3466.json
new file mode 100644
index 000000000..7ea45b346
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/kubenodestatusallocatablecpucores_64a872f9-5ec6-4121-acad-edd12f4c3466.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of available cpu cores in a managed cluster",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "kube_node_status_allocatable_cpu_cores",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/kubenodestatusallocatablememorybytes_14fa63fb-7da9-4d2e-9de9-203c4a3e0401.json b/services/ContainerService/managedClusters/templates/arm/kubenodestatusallocatablememorybytes_14fa63fb-7da9-4d2e-9de9-203c4a3e0401.json
new file mode 100644
index 000000000..55b4ab322
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/kubenodestatusallocatablememorybytes_14fa63fb-7da9-4d2e-9de9-203c4a3e0401.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total amount of available memory in a managed cluster",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2147483648",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "kube_node_status_allocatable_memory_bytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/kubenodestatuscondition_ebbbbb92-5208-4d52-b407-6bea8e4473b9.json b/services/ContainerService/managedClusters/templates/arm/kubenodestatuscondition_ebbbbb92-5208-4d52-b407-6bea8e4473b9.json
new file mode 100644
index 000000000..d4d20beb8
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/kubenodestatuscondition_ebbbbb92-5208-4d52-b407-6bea8e4473b9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Statuses for various node conditions",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "kube_node_status_condition",
+ "dimensions": [{"operator": "include", "name": "status2", "values": ["notready", "unknown"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/kubepodstatusphase_e38e6e11-ac88-4014-98c8-8e64f70b832a.json b/services/ContainerService/managedClusters/templates/arm/kubepodstatusphase_e38e6e11-ac88-4014-98c8-8e64f70b832a.json
new file mode 100644
index 000000000..a0c16bc02
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/kubepodstatusphase_e38e6e11-ac88-4014-98c8-8e64f70b832a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of pods by phase",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "kube_pod_status_phase",
+ "dimensions": [{"operator": "include", "name": "phase", "values": ["failed"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/kubepodstatusready_cebf00b7-7294-4cf7-bc50-108f999d0c67.json b/services/ContainerService/managedClusters/templates/arm/kubepodstatusready_cebf00b7-7294-4cf7-bc50-108f999d0c67.json
new file mode 100644
index 000000000..582f79aab
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/kubepodstatusready_cebf00b7-7294-4cf7-bc50-108f999d0c67.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of pods in Ready state",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "kube_pod_status_ready",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/nodecpuusagepercentage_1303e91d-bc80-4ec2-937e-1d179fc32b43.json b/services/ContainerService/managedClusters/templates/arm/nodecpuusagepercentage_1303e91d-bc80-4ec2-937e-1d179fc32b43.json
new file mode 100644
index 000000000..3b924bc3b
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/nodecpuusagepercentage_1303e91d-bc80-4ec2-937e-1d179fc32b43.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Aggregated average CPU utilization measured in percentage across the cluster",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "node_cpu_usage_percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/nodediskusagepercentage_aa3c5697-5cca-4c16-a37e-94f1d580701e.json b/services/ContainerService/managedClusters/templates/arm/nodediskusagepercentage_aa3c5697-5cca-4c16-a37e-94f1d580701e.json
new file mode 100644
index 000000000..3ab99c40a
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/nodediskusagepercentage_aa3c5697-5cca-4c16-a37e-94f1d580701e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Disk space used in percent by device",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "node_disk_usage_percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/nodememoryrsspercentage_e89e023e-117b-4db4-bfb2-853849e273f5.json b/services/ContainerService/managedClusters/templates/arm/nodememoryrsspercentage_e89e023e-117b-4db4-bfb2-853849e273f5.json
new file mode 100644
index 000000000..d4dab79c6
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/nodememoryrsspercentage_e89e023e-117b-4db4-bfb2-853849e273f5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Container RSS memory used in percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "node_memory_rss_percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/arm/nodememoryworkingsetpercentage_9ae2dfbf-d69b-4802-8497-8b7836bef5e9.json b/services/ContainerService/managedClusters/templates/arm/nodememoryworkingsetpercentage_9ae2dfbf-d69b-4802-8497-8b7836bef5e9.json
new file mode 100644
index 000000000..68e595f98
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/arm/nodememoryworkingsetpercentage_9ae2dfbf-d69b-4802-8497-8b7836bef5e9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Container working set memory used in percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "node_memory_working_set_percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/clusterautoscalerclustersafetoautoscale_49fd8bac-d061-459d-8d80-a048c4c8ba56.bicep b/services/ContainerService/managedClusters/templates/bicep/clusterautoscalerclustersafetoautoscale_49fd8bac-d061-459d-8d80-a048c4c8ba56.bicep
new file mode 100644
index 000000000..ef9b82dbd
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/clusterautoscalerclustersafetoautoscale_49fd8bac-d061-459d-8d80-a048c4c8ba56.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Determines whether or not cluster autoscaler will take action on the cluster'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cluster_autoscaler_cluster_safe_to_autoscale'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/clusterautoscalerunschedulablepodscount_301ca0e3-fc88-4285-be99-a2a587c412f5.bicep b/services/ContainerService/managedClusters/templates/bicep/clusterautoscalerunschedulablepodscount_301ca0e3-fc88-4285-be99-a2a587c412f5.bicep
new file mode 100644
index 000000000..1b78abd48
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/clusterautoscalerunschedulablepodscount_301ca0e3-fc88-4285-be99-a2a587c412f5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of pods that are currently unschedulable in the cluster'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cluster_autoscaler_unschedulable_pods_count'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/kubenodestatusallocatablecpucores_64a872f9-5ec6-4121-acad-edd12f4c3466.bicep b/services/ContainerService/managedClusters/templates/bicep/kubenodestatusallocatablecpucores_64a872f9-5ec6-4121-acad-edd12f4c3466.bicep
new file mode 100644
index 000000000..7d03ff7d5
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/kubenodestatusallocatablecpucores_64a872f9-5ec6-4121-acad-edd12f4c3466.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of available cpu cores in a managed cluster'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'kube_node_status_allocatable_cpu_cores'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/kubenodestatusallocatablememorybytes_14fa63fb-7da9-4d2e-9de9-203c4a3e0401.bicep b/services/ContainerService/managedClusters/templates/bicep/kubenodestatusallocatablememorybytes_14fa63fb-7da9-4d2e-9de9-203c4a3e0401.bicep
new file mode 100644
index 000000000..229e5e7b5
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/kubenodestatusallocatablememorybytes_14fa63fb-7da9-4d2e-9de9-203c4a3e0401.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total amount of available memory in a managed cluster'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2147483648
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'kube_node_status_allocatable_memory_bytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/kubenodestatuscondition_ebbbbb92-5208-4d52-b407-6bea8e4473b9.bicep b/services/ContainerService/managedClusters/templates/bicep/kubenodestatuscondition_ebbbbb92-5208-4d52-b407-6bea8e4473b9.bicep
new file mode 100644
index 000000000..515450740
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/kubenodestatuscondition_ebbbbb92-5208-4d52-b407-6bea8e4473b9.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Statuses for various node conditions'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'kube_node_status_condition'
+ dimensions: [
+ {
+ name: 'status2'
+ operator: 'include'
+ values: ['notready','unknown']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/kubepodstatusphase_e38e6e11-ac88-4014-98c8-8e64f70b832a.bicep b/services/ContainerService/managedClusters/templates/bicep/kubepodstatusphase_e38e6e11-ac88-4014-98c8-8e64f70b832a.bicep
new file mode 100644
index 000000000..03561c475
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/kubepodstatusphase_e38e6e11-ac88-4014-98c8-8e64f70b832a.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of pods by phase'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'kube_pod_status_phase'
+ dimensions: [
+ {
+ name: 'phase'
+ operator: 'include'
+ values: ['failed']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/kubepodstatusready_cebf00b7-7294-4cf7-bc50-108f999d0c67.bicep b/services/ContainerService/managedClusters/templates/bicep/kubepodstatusready_cebf00b7-7294-4cf7-bc50-108f999d0c67.bicep
new file mode 100644
index 000000000..f44acfdc7
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/kubepodstatusready_cebf00b7-7294-4cf7-bc50-108f999d0c67.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of pods in Ready state'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'kube_pod_status_ready'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/nodecpuusagepercentage_1303e91d-bc80-4ec2-937e-1d179fc32b43.bicep b/services/ContainerService/managedClusters/templates/bicep/nodecpuusagepercentage_1303e91d-bc80-4ec2-937e-1d179fc32b43.bicep
new file mode 100644
index 000000000..c597b64d5
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/nodecpuusagepercentage_1303e91d-bc80-4ec2-937e-1d179fc32b43.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Aggregated average CPU utilization measured in percentage across the cluster'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'node_cpu_usage_percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/nodediskusagepercentage_aa3c5697-5cca-4c16-a37e-94f1d580701e.bicep b/services/ContainerService/managedClusters/templates/bicep/nodediskusagepercentage_aa3c5697-5cca-4c16-a37e-94f1d580701e.bicep
new file mode 100644
index 000000000..a3aae2d4e
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/nodediskusagepercentage_aa3c5697-5cca-4c16-a37e-94f1d580701e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Disk space used in percent by device'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'node_disk_usage_percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/nodememoryrsspercentage_e89e023e-117b-4db4-bfb2-853849e273f5.bicep b/services/ContainerService/managedClusters/templates/bicep/nodememoryrsspercentage_e89e023e-117b-4db4-bfb2-853849e273f5.bicep
new file mode 100644
index 000000000..a0bc907fa
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/nodememoryrsspercentage_e89e023e-117b-4db4-bfb2-853849e273f5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Container RSS memory used in percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'node_memory_rss_percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ContainerService/managedClusters/templates/bicep/nodememoryworkingsetpercentage_9ae2dfbf-d69b-4802-8497-8b7836bef5e9.bicep b/services/ContainerService/managedClusters/templates/bicep/nodememoryworkingsetpercentage_9ae2dfbf-d69b-4802-8497-8b7836bef5e9.bicep
new file mode 100644
index 000000000..b0fd75db1
--- /dev/null
+++ b/services/ContainerService/managedClusters/templates/bicep/nodememoryworkingsetpercentage_9ae2dfbf-d69b-4802-8497-8b7836bef5e9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Container working set memory used in percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'node_memory_working_set_percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMariaDB/servers/templates/arm/cpupercent_0f19979d-9dc2-4636-8e15-435bbfa1f0f9.json b/services/DBforMariaDB/servers/templates/arm/cpupercent_0f19979d-9dc2-4636-8e15-435bbfa1f0f9.json
new file mode 100644
index 000000000..3ad80248d
--- /dev/null
+++ b/services/DBforMariaDB/servers/templates/arm/cpupercent_0f19979d-9dc2-4636-8e15-435bbfa1f0f9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cpu_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMariaDB/servers/templates/arm/ioconsumptionpercent_13bbfe6e-3b65-4940-9344-6d1cc78e7d54.json b/services/DBforMariaDB/servers/templates/arm/ioconsumptionpercent_13bbfe6e-3b65-4940-9344-6d1cc78e7d54.json
new file mode 100644
index 000000000..a2593750d
--- /dev/null
+++ b/services/DBforMariaDB/servers/templates/arm/ioconsumptionpercent_13bbfe6e-3b65-4940-9344-6d1cc78e7d54.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "IO percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "io_consumption_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMariaDB/servers/templates/arm/memorypercent_faf01668-c98a-4755-ae74-9dd4151f4c39.json b/services/DBforMariaDB/servers/templates/arm/memorypercent_faf01668-c98a-4755-ae74-9dd4151f4c39.json
new file mode 100644
index 000000000..4049f2a80
--- /dev/null
+++ b/services/DBforMariaDB/servers/templates/arm/memorypercent_faf01668-c98a-4755-ae74-9dd4151f4c39.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "memory_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMariaDB/servers/templates/arm/storagepercent_ef38051a-d9e3-4705-b208-29a421e729be.json b/services/DBforMariaDB/servers/templates/arm/storagepercent_ef38051a-d9e3-4705-b208-29a421e729be.json
new file mode 100644
index 000000000..45e23a253
--- /dev/null
+++ b/services/DBforMariaDB/servers/templates/arm/storagepercent_ef38051a-d9e3-4705-b208-29a421e729be.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Storage percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "storage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMariaDB/servers/templates/bicep/cpupercent_0f19979d-9dc2-4636-8e15-435bbfa1f0f9.bicep b/services/DBforMariaDB/servers/templates/bicep/cpupercent_0f19979d-9dc2-4636-8e15-435bbfa1f0f9.bicep
new file mode 100644
index 000000000..85037e236
--- /dev/null
+++ b/services/DBforMariaDB/servers/templates/bicep/cpupercent_0f19979d-9dc2-4636-8e15-435bbfa1f0f9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cpu_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMariaDB/servers/templates/bicep/ioconsumptionpercent_13bbfe6e-3b65-4940-9344-6d1cc78e7d54.bicep b/services/DBforMariaDB/servers/templates/bicep/ioconsumptionpercent_13bbfe6e-3b65-4940-9344-6d1cc78e7d54.bicep
new file mode 100644
index 000000000..082b5e712
--- /dev/null
+++ b/services/DBforMariaDB/servers/templates/bicep/ioconsumptionpercent_13bbfe6e-3b65-4940-9344-6d1cc78e7d54.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'IO percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'io_consumption_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMariaDB/servers/templates/bicep/memorypercent_faf01668-c98a-4755-ae74-9dd4151f4c39.bicep b/services/DBforMariaDB/servers/templates/bicep/memorypercent_faf01668-c98a-4755-ae74-9dd4151f4c39.bicep
new file mode 100644
index 000000000..327251236
--- /dev/null
+++ b/services/DBforMariaDB/servers/templates/bicep/memorypercent_faf01668-c98a-4755-ae74-9dd4151f4c39.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'memory_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMariaDB/servers/templates/bicep/storagepercent_ef38051a-d9e3-4705-b208-29a421e729be.bicep b/services/DBforMariaDB/servers/templates/bicep/storagepercent_ef38051a-d9e3-4705-b208-29a421e729be.bicep
new file mode 100644
index 000000000..b4dcfaf55
--- /dev/null
+++ b/services/DBforMariaDB/servers/templates/bicep/storagepercent_ef38051a-d9e3-4705-b208-29a421e729be.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Storage percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'storage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/arm/abortedconnections_269d640c-b6ba-45e1-a52f-67708f9f99d7.json b/services/DBforMySQL/flexibleServers/templates/arm/abortedconnections_269d640c-b6ba-45e1-a52f-67708f9f99d7.json
new file mode 100644
index 000000000..20a9b07cb
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/arm/abortedconnections_269d640c-b6ba-45e1-a52f-67708f9f99d7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Aborted Connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "aborted_connections",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/arm/activeconnections_347674ce-8534-403d-8281-cac9ea6f412a.json b/services/DBforMySQL/flexibleServers/templates/arm/activeconnections_347674ce-8534-403d-8281-cac9ea6f412a.json
new file mode 100644
index 000000000..d7352ca3b
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/arm/activeconnections_347674ce-8534-403d-8281-cac9ea6f412a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Active Connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "active_connections",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/arm/cpupercent_218161be-4952-495b-aed1-03cccda3d42f.json b/services/DBforMySQL/flexibleServers/templates/arm/cpupercent_218161be-4952-495b-aed1-03cccda3d42f.json
new file mode 100644
index 000000000..72664503d
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/arm/cpupercent_218161be-4952-495b-aed1-03cccda3d42f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Host CPU Percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT6H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cpu_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/arm/ioconsumptionpercent_a3601973-f48c-4bf2-8384-90d250702a79.json b/services/DBforMySQL/flexibleServers/templates/arm/ioconsumptionpercent_a3601973-f48c-4bf2-8384-90d250702a79.json
new file mode 100644
index 000000000..4a557cfa5
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/arm/ioconsumptionpercent_a3601973-f48c-4bf2-8384-90d250702a79.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Storage I/O consumption percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT6H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "io_consumption_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/arm/memorypercent_757e2adf-60b8-4688-ae8f-03dd7dcd5226.json b/services/DBforMySQL/flexibleServers/templates/arm/memorypercent_757e2adf-60b8-4688-ae8f-03dd7dcd5226.json
new file mode 100644
index 000000000..6ad82ac93
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/arm/memorypercent_757e2adf-60b8-4688-ae8f-03dd7dcd5226.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Host Memory Percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "memory_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/arm/replicationlag_dfe563fc-0ec1-401d-a362-8d293a06d02b.json b/services/DBforMySQL/flexibleServers/templates/arm/replicationlag_dfe563fc-0ec1-401d-a362-8d293a06d02b.json
new file mode 100644
index 000000000..dd565d33c
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/arm/replicationlag_dfe563fc-0ec1-401d-a362-8d293a06d02b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Replication lag in seconds",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "6000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "replication_lag",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/arm/storagelimit_f285c23f-3b8e-428a-b289-8ff38a3c0e4b.json b/services/DBforMySQL/flexibleServers/templates/arm/storagelimit_f285c23f-3b8e-428a-b289-8ff38a3c0e4b.json
new file mode 100644
index 000000000..c2b81ea54
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/arm/storagelimit_f285c23f-3b8e-428a-b289-8ff38a3c0e4b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Storage Limit",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "15000000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "storage_limit",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/arm/storagepercent_e6771f44-f6d3-4a27-a9e4-b402a79c2891.json b/services/DBforMySQL/flexibleServers/templates/arm/storagepercent_e6771f44-f6d3-4a27-a9e4-b402a79c2891.json
new file mode 100644
index 000000000..1a090bc7c
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/arm/storagepercent_e6771f44-f6d3-4a27-a9e4-b402a79c2891.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Storage Percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "storage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/bicep/abortedconnections_269d640c-b6ba-45e1-a52f-67708f9f99d7.bicep b/services/DBforMySQL/flexibleServers/templates/bicep/abortedconnections_269d640c-b6ba-45e1-a52f-67708f9f99d7.bicep
new file mode 100644
index 000000000..d0e48406f
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/bicep/abortedconnections_269d640c-b6ba-45e1-a52f-67708f9f99d7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Aborted Connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'aborted_connections'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/bicep/activeconnections_347674ce-8534-403d-8281-cac9ea6f412a.bicep b/services/DBforMySQL/flexibleServers/templates/bicep/activeconnections_347674ce-8534-403d-8281-cac9ea6f412a.bicep
new file mode 100644
index 000000000..680ac7062
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/bicep/activeconnections_347674ce-8534-403d-8281-cac9ea6f412a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Active Connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'active_connections'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/bicep/cpupercent_218161be-4952-495b-aed1-03cccda3d42f.bicep b/services/DBforMySQL/flexibleServers/templates/bicep/cpupercent_218161be-4952-495b-aed1-03cccda3d42f.bicep
new file mode 100644
index 000000000..b9de46bcc
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/bicep/cpupercent_218161be-4952-495b-aed1-03cccda3d42f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Host CPU Percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT6H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cpu_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/bicep/ioconsumptionpercent_a3601973-f48c-4bf2-8384-90d250702a79.bicep b/services/DBforMySQL/flexibleServers/templates/bicep/ioconsumptionpercent_a3601973-f48c-4bf2-8384-90d250702a79.bicep
new file mode 100644
index 000000000..3e25194a7
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/bicep/ioconsumptionpercent_a3601973-f48c-4bf2-8384-90d250702a79.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Storage I/O consumption percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT6H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'io_consumption_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/bicep/memorypercent_757e2adf-60b8-4688-ae8f-03dd7dcd5226.bicep b/services/DBforMySQL/flexibleServers/templates/bicep/memorypercent_757e2adf-60b8-4688-ae8f-03dd7dcd5226.bicep
new file mode 100644
index 000000000..de0906952
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/bicep/memorypercent_757e2adf-60b8-4688-ae8f-03dd7dcd5226.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Host Memory Percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'memory_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/bicep/replicationlag_dfe563fc-0ec1-401d-a362-8d293a06d02b.bicep b/services/DBforMySQL/flexibleServers/templates/bicep/replicationlag_dfe563fc-0ec1-401d-a362-8d293a06d02b.bicep
new file mode 100644
index 000000000..b5a217e59
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/bicep/replicationlag_dfe563fc-0ec1-401d-a362-8d293a06d02b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Replication lag in seconds'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 6000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'replication_lag'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/bicep/storagelimit_f285c23f-3b8e-428a-b289-8ff38a3c0e4b.bicep b/services/DBforMySQL/flexibleServers/templates/bicep/storagelimit_f285c23f-3b8e-428a-b289-8ff38a3c0e4b.bicep
new file mode 100644
index 000000000..90d0b7025
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/bicep/storagelimit_f285c23f-3b8e-428a-b289-8ff38a3c0e4b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Storage Limit'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 15000000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'storage_limit'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/flexibleServers/templates/bicep/storagepercent_e6771f44-f6d3-4a27-a9e4-b402a79c2891.bicep b/services/DBforMySQL/flexibleServers/templates/bicep/storagepercent_e6771f44-f6d3-4a27-a9e4-b402a79c2891.bicep
new file mode 100644
index 000000000..e6cc8267b
--- /dev/null
+++ b/services/DBforMySQL/flexibleServers/templates/bicep/storagepercent_e6771f44-f6d3-4a27-a9e4-b402a79c2891.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Storage Percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'storage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/servers/templates/arm/activeconnections_60453255-5e0e-4fa5-95b5-6c449bee6902.json b/services/DBforMySQL/servers/templates/arm/activeconnections_60453255-5e0e-4fa5-95b5-6c449bee6902.json
new file mode 100644
index 000000000..de9a67568
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/arm/activeconnections_60453255-5e0e-4fa5-95b5-6c449bee6902.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Active Connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1500",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "active_connections",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/servers/templates/arm/connectionsfailed_f0767b27-b88b-46a1-ab90-37dc8c399358.json b/services/DBforMySQL/servers/templates/arm/connectionsfailed_f0767b27-b88b-46a1-ab90-37dc8c399358.json
new file mode 100644
index 000000000..8ddbc9370
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/arm/connectionsfailed_f0767b27-b88b-46a1-ab90-37dc8c399358.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed Connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "connections_failed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/servers/templates/arm/cpupercent_173e6b88-e8a9-4763-becb-9c749878c767.json b/services/DBforMySQL/servers/templates/arm/cpupercent_173e6b88-e8a9-4763-becb-9c749878c767.json
new file mode 100644
index 000000000..9f2a9c4b4
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/arm/cpupercent_173e6b88-e8a9-4763-becb-9c749878c767.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cpu_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/servers/templates/arm/ioconsumptionpercent_978944c7-a049-4847-8483-dcf5baa92f6a.json b/services/DBforMySQL/servers/templates/arm/ioconsumptionpercent_978944c7-a049-4847-8483-dcf5baa92f6a.json
new file mode 100644
index 000000000..3ef1b28ee
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/arm/ioconsumptionpercent_978944c7-a049-4847-8483-dcf5baa92f6a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "IO percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "io_consumption_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/servers/templates/arm/memorypercent_3a1dd0bd-ebe9-4f9b-b38c-88686a390bdd.json b/services/DBforMySQL/servers/templates/arm/memorypercent_3a1dd0bd-ebe9-4f9b-b38c-88686a390bdd.json
new file mode 100644
index 000000000..fc648516f
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/arm/memorypercent_3a1dd0bd-ebe9-4f9b-b38c-88686a390bdd.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "memory_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/servers/templates/arm/serverlogstoragepercent_af2b7bbb-9476-475a-b523-da3ee521eda7.json b/services/DBforMySQL/servers/templates/arm/serverlogstoragepercent_af2b7bbb-9476-475a-b523-da3ee521eda7.json
new file mode 100644
index 000000000..568a8e8e8
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/arm/serverlogstoragepercent_af2b7bbb-9476-475a-b523-da3ee521eda7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Server Log storage percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "serverlog_storage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/servers/templates/arm/storagepercent_4f988eb2-c420-4ef2-82ed-2569b21b70e1.json b/services/DBforMySQL/servers/templates/arm/storagepercent_4f988eb2-c420-4ef2-82ed-2569b21b70e1.json
new file mode 100644
index 000000000..acaf2dc63
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/arm/storagepercent_4f988eb2-c420-4ef2-82ed-2569b21b70e1.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Storage percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "storage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforMySQL/servers/templates/bicep/activeconnections_60453255-5e0e-4fa5-95b5-6c449bee6902.bicep b/services/DBforMySQL/servers/templates/bicep/activeconnections_60453255-5e0e-4fa5-95b5-6c449bee6902.bicep
new file mode 100644
index 000000000..a9ec197b6
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/bicep/activeconnections_60453255-5e0e-4fa5-95b5-6c449bee6902.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Active Connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1500
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'active_connections'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/servers/templates/bicep/connectionsfailed_f0767b27-b88b-46a1-ab90-37dc8c399358.bicep b/services/DBforMySQL/servers/templates/bicep/connectionsfailed_f0767b27-b88b-46a1-ab90-37dc8c399358.bicep
new file mode 100644
index 000000000..ef386045a
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/bicep/connectionsfailed_f0767b27-b88b-46a1-ab90-37dc8c399358.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed Connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'connections_failed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/servers/templates/bicep/cpupercent_173e6b88-e8a9-4763-becb-9c749878c767.bicep b/services/DBforMySQL/servers/templates/bicep/cpupercent_173e6b88-e8a9-4763-becb-9c749878c767.bicep
new file mode 100644
index 000000000..8b51a9cc6
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/bicep/cpupercent_173e6b88-e8a9-4763-becb-9c749878c767.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cpu_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/servers/templates/bicep/ioconsumptionpercent_978944c7-a049-4847-8483-dcf5baa92f6a.bicep b/services/DBforMySQL/servers/templates/bicep/ioconsumptionpercent_978944c7-a049-4847-8483-dcf5baa92f6a.bicep
new file mode 100644
index 000000000..2bb2e0d88
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/bicep/ioconsumptionpercent_978944c7-a049-4847-8483-dcf5baa92f6a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'IO percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'io_consumption_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/servers/templates/bicep/memorypercent_3a1dd0bd-ebe9-4f9b-b38c-88686a390bdd.bicep b/services/DBforMySQL/servers/templates/bicep/memorypercent_3a1dd0bd-ebe9-4f9b-b38c-88686a390bdd.bicep
new file mode 100644
index 000000000..c91ff46cb
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/bicep/memorypercent_3a1dd0bd-ebe9-4f9b-b38c-88686a390bdd.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'memory_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/servers/templates/bicep/serverlogstoragepercent_af2b7bbb-9476-475a-b523-da3ee521eda7.bicep b/services/DBforMySQL/servers/templates/bicep/serverlogstoragepercent_af2b7bbb-9476-475a-b523-da3ee521eda7.bicep
new file mode 100644
index 000000000..27dc12a2e
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/bicep/serverlogstoragepercent_af2b7bbb-9476-475a-b523-da3ee521eda7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Server Log storage percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'serverlog_storage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforMySQL/servers/templates/bicep/storagepercent_4f988eb2-c420-4ef2-82ed-2569b21b70e1.bicep b/services/DBforMySQL/servers/templates/bicep/storagepercent_4f988eb2-c420-4ef2-82ed-2569b21b70e1.bicep
new file mode 100644
index 000000000..9c855c291
--- /dev/null
+++ b/services/DBforMySQL/servers/templates/bicep/storagepercent_4f988eb2-c420-4ef2-82ed-2569b21b70e1.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Storage percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'storage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/activeconnections_f9b59221-8055-449e-bfd5-7a056945c694.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/activeconnections_f9b59221-8055-449e-bfd5-7a056945c694.json
new file mode 100644
index 000000000..fd7084a27
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/activeconnections_f9b59221-8055-449e-bfd5-7a056945c694.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Active Connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "120",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "active_connections",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/connectionsfailed_5f9cdad0-db39-48c9-a4eb-3107b5b79414.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/connectionsfailed_5f9cdad0-db39-48c9-a4eb-3107b5b79414.json
new file mode 100644
index 000000000..a0cd87a4e
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/connectionsfailed_5f9cdad0-db39-48c9-a4eb-3107b5b79414.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed Connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "connections_failed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/cpupercent_389057c9-a0e0-4327-b89f-58c3dabb519d.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/cpupercent_389057c9-a0e0-4327-b89f-58c3dabb519d.json
new file mode 100644
index 000000000..471f21d64
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/cpupercent_389057c9-a0e0-4327-b89f-58c3dabb519d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cpu_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/deadlocks_1904dd93-9655-403f-bb89-dc42e5ebc666.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/deadlocks_1904dd93-9655-403f-bb89-dc42e5ebc666.json
new file mode 100644
index 000000000..931d85023
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/deadlocks_1904dd93-9655-403f-bb89-dc42e5ebc666.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of deadlocks detected in this database",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "deadlocks",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/diskiopsconsumedpercentage_5856ad80-7256-441f-8a62-af1fdc712018.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/diskiopsconsumedpercentage_5856ad80-7256-441f-8a62-af1fdc712018.json
new file mode 100644
index 000000000..bf4ae8fc5
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/diskiopsconsumedpercentage_5856ad80-7256-441f-8a62-af1fdc712018.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of disk I/Os consumed per minute",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "disk_iops_consumed_percentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/iops_eb3e1fb3-83e9-4764-b6e1-532bb22ce1aa.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/iops_eb3e1fb3-83e9-4764-b6e1-532bb22ce1aa.json
new file mode 100644
index 000000000..68b084c40
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/iops_eb3e1fb3-83e9-4764-b6e1-532bb22ce1aa.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "IO Operations per second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "450",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "iops",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/isdbalive_b0ac25d8-ae08-45e1-8a1e-5204514ad7bd.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/isdbalive_b0ac25d8-ae08-45e1-8a1e-5204514ad7bd.json
new file mode 100644
index 000000000..1210ab562
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/isdbalive_b0ac25d8-ae08-45e1-8a1e-5204514ad7bd.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Indicates if the database is up or not",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "is_db_alive",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/maximumusedtransactionIDs_1103b9a5-3d3d-4aa8-a3c2-66958e32c220.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/maximumusedtransactionIDs_1103b9a5-3d3d-4aa8-a3c2-66958e32c220.json
new file mode 100644
index 000000000..837afefce
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/maximumusedtransactionIDs_1103b9a5-3d3d-4aa8-a3c2-66958e32c220.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Maximum Used Transaction IDs",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10737418240",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "maximum_used_transactionIDs",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/memorypercent_0c64aa8f-4bdb-4bb0-961c-d298000536af.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/memorypercent_0c64aa8f-4bdb-4bb0-961c-d298000536af.json
new file mode 100644
index 000000000..4049f2a80
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/memorypercent_0c64aa8f-4bdb-4bb0-961c-d298000536af.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "memory_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/storagefree_d389ee62-f431-4faa-a4bc-4a3d02cea182.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/storagefree_d389ee62-f431-4faa-a4bc-4a3d02cea182.json
new file mode 100644
index 000000000..c69ef8f9a
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/storagefree_d389ee62-f431-4faa-a4bc-4a3d02cea182.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Storage Free",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10737418240",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "storage_free",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/arm/storagepercent_e397645f-359b-46d1-8182-d2cabab71aae.json b/services/DBforPostgreSQL/flexibleServers/templates/arm/storagepercent_e397645f-359b-46d1-8182-d2cabab71aae.json
new file mode 100644
index 000000000..a40c2c294
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/arm/storagepercent_e397645f-359b-46d1-8182-d2cabab71aae.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Storage percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "storage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/activeconnections_f9b59221-8055-449e-bfd5-7a056945c694.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/activeconnections_f9b59221-8055-449e-bfd5-7a056945c694.bicep
new file mode 100644
index 000000000..839831344
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/activeconnections_f9b59221-8055-449e-bfd5-7a056945c694.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Active Connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 120
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'active_connections'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/connectionsfailed_5f9cdad0-db39-48c9-a4eb-3107b5b79414.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/connectionsfailed_5f9cdad0-db39-48c9-a4eb-3107b5b79414.bicep
new file mode 100644
index 000000000..7f061d3cd
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/connectionsfailed_5f9cdad0-db39-48c9-a4eb-3107b5b79414.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed Connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'connections_failed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/cpupercent_389057c9-a0e0-4327-b89f-58c3dabb519d.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/cpupercent_389057c9-a0e0-4327-b89f-58c3dabb519d.bicep
new file mode 100644
index 000000000..c3f7cd051
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/cpupercent_389057c9-a0e0-4327-b89f-58c3dabb519d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cpu_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/deadlocks_1904dd93-9655-403f-bb89-dc42e5ebc666.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/deadlocks_1904dd93-9655-403f-bb89-dc42e5ebc666.bicep
new file mode 100644
index 000000000..5cb2df5ce
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/deadlocks_1904dd93-9655-403f-bb89-dc42e5ebc666.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of deadlocks detected in this database'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'deadlocks'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/diskiopsconsumedpercentage_5856ad80-7256-441f-8a62-af1fdc712018.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/diskiopsconsumedpercentage_5856ad80-7256-441f-8a62-af1fdc712018.bicep
new file mode 100644
index 000000000..8c95448b7
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/diskiopsconsumedpercentage_5856ad80-7256-441f-8a62-af1fdc712018.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of disk I/Os consumed per minute'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'disk_iops_consumed_percentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/iops_eb3e1fb3-83e9-4764-b6e1-532bb22ce1aa.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/iops_eb3e1fb3-83e9-4764-b6e1-532bb22ce1aa.bicep
new file mode 100644
index 000000000..1bee4db2e
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/iops_eb3e1fb3-83e9-4764-b6e1-532bb22ce1aa.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'IO Operations per second'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 450
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'iops'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/isdbalive_b0ac25d8-ae08-45e1-8a1e-5204514ad7bd.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/isdbalive_b0ac25d8-ae08-45e1-8a1e-5204514ad7bd.bicep
new file mode 100644
index 000000000..587bcae77
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/isdbalive_b0ac25d8-ae08-45e1-8a1e-5204514ad7bd.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Indicates if the database is up or not'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'is_db_alive'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/maximumusedtransactionIDs_1103b9a5-3d3d-4aa8-a3c2-66958e32c220.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/maximumusedtransactionIDs_1103b9a5-3d3d-4aa8-a3c2-66958e32c220.bicep
new file mode 100644
index 000000000..e486be306
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/maximumusedtransactionIDs_1103b9a5-3d3d-4aa8-a3c2-66958e32c220.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Maximum Used Transaction IDs'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10737418240
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'maximum_used_transactionIDs'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/memorypercent_0c64aa8f-4bdb-4bb0-961c-d298000536af.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/memorypercent_0c64aa8f-4bdb-4bb0-961c-d298000536af.bicep
new file mode 100644
index 000000000..327251236
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/memorypercent_0c64aa8f-4bdb-4bb0-961c-d298000536af.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'memory_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/storagefree_d389ee62-f431-4faa-a4bc-4a3d02cea182.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/storagefree_d389ee62-f431-4faa-a4bc-4a3d02cea182.bicep
new file mode 100644
index 000000000..726b512f1
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/storagefree_d389ee62-f431-4faa-a4bc-4a3d02cea182.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Storage Free'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10737418240
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'storage_free'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/flexibleServers/templates/bicep/storagepercent_e397645f-359b-46d1-8182-d2cabab71aae.bicep b/services/DBforPostgreSQL/flexibleServers/templates/bicep/storagepercent_e397645f-359b-46d1-8182-d2cabab71aae.bicep
new file mode 100644
index 000000000..9532a470b
--- /dev/null
+++ b/services/DBforPostgreSQL/flexibleServers/templates/bicep/storagepercent_e397645f-359b-46d1-8182-d2cabab71aae.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Storage percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'storage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/servers/templates/arm/activeconnections_186c5227-a9f4-4cd0-a355-c8d28f359398.json b/services/DBforPostgreSQL/servers/templates/arm/activeconnections_186c5227-a9f4-4cd0-a355-c8d28f359398.json
new file mode 100644
index 000000000..fd7084a27
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/arm/activeconnections_186c5227-a9f4-4cd0-a355-c8d28f359398.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Active Connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "120",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "active_connections",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/servers/templates/arm/connectionsfailed_0a6de1a0-e4df-470f-9bc7-247838fc428c.json b/services/DBforPostgreSQL/servers/templates/arm/connectionsfailed_0a6de1a0-e4df-470f-9bc7-247838fc428c.json
new file mode 100644
index 000000000..8ddbc9370
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/arm/connectionsfailed_0a6de1a0-e4df-470f-9bc7-247838fc428c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed Connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "connections_failed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/servers/templates/arm/cpupercent_a2b3fa9d-f7e8-4d1e-967c-3d661bc06708.json b/services/DBforPostgreSQL/servers/templates/arm/cpupercent_a2b3fa9d-f7e8-4d1e-967c-3d661bc06708.json
new file mode 100644
index 000000000..3ad80248d
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/arm/cpupercent_a2b3fa9d-f7e8-4d1e-967c-3d661bc06708.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cpu_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/servers/templates/arm/ioconsumptionpercent_ea7248bd-f96c-4391-ac48-c95312441028.json b/services/DBforPostgreSQL/servers/templates/arm/ioconsumptionpercent_ea7248bd-f96c-4391-ac48-c95312441028.json
new file mode 100644
index 000000000..e89cbafd1
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/arm/ioconsumptionpercent_ea7248bd-f96c-4391-ac48-c95312441028.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "IO percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "io_consumption_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/servers/templates/arm/memorypercent_1d53e3ac-e98a-426c-81f1-aa1834c49692.json b/services/DBforPostgreSQL/servers/templates/arm/memorypercent_1d53e3ac-e98a-426c-81f1-aa1834c49692.json
new file mode 100644
index 000000000..4049f2a80
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/arm/memorypercent_1d53e3ac-e98a-426c-81f1-aa1834c49692.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "memory_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/servers/templates/arm/pgreplicalogdelayinseconds_90c0997a-f96e-4a34-87c7-c394c6e8b940.json b/services/DBforPostgreSQL/servers/templates/arm/pgreplicalogdelayinseconds_90c0997a-f96e-4a34-87c7-c394c6e8b940.json
new file mode 100644
index 000000000..d85f87c58
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/arm/pgreplicalogdelayinseconds_90c0997a-f96e-4a34-87c7-c394c6e8b940.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Replica lag in seconds",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "60",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "pg_replica_log_delay_in_seconds",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/servers/templates/arm/serverlogstoragepercent_56a13163-c2b6-4235-96bd-ef1e373b19ba.json b/services/DBforPostgreSQL/servers/templates/arm/serverlogstoragepercent_56a13163-c2b6-4235-96bd-ef1e373b19ba.json
new file mode 100644
index 000000000..cefb8b2a8
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/arm/serverlogstoragepercent_56a13163-c2b6-4235-96bd-ef1e373b19ba.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Server Log storage percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "serverlog_storage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/servers/templates/arm/storagepercent_e031f8bf-ed3f-4a41-87fe-b301c1d02367.json b/services/DBforPostgreSQL/servers/templates/arm/storagepercent_e031f8bf-ed3f-4a41-87fe-b301c1d02367.json
new file mode 100644
index 000000000..a40c2c294
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/arm/storagepercent_e031f8bf-ed3f-4a41-87fe-b301c1d02367.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Storage percent",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "storage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DBforPostgreSQL/servers/templates/bicep/activeconnections_186c5227-a9f4-4cd0-a355-c8d28f359398.bicep b/services/DBforPostgreSQL/servers/templates/bicep/activeconnections_186c5227-a9f4-4cd0-a355-c8d28f359398.bicep
new file mode 100644
index 000000000..839831344
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/bicep/activeconnections_186c5227-a9f4-4cd0-a355-c8d28f359398.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Active Connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 120
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'active_connections'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/servers/templates/bicep/connectionsfailed_0a6de1a0-e4df-470f-9bc7-247838fc428c.bicep b/services/DBforPostgreSQL/servers/templates/bicep/connectionsfailed_0a6de1a0-e4df-470f-9bc7-247838fc428c.bicep
new file mode 100644
index 000000000..ef386045a
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/bicep/connectionsfailed_0a6de1a0-e4df-470f-9bc7-247838fc428c.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed Connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'connections_failed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/servers/templates/bicep/cpupercent_a2b3fa9d-f7e8-4d1e-967c-3d661bc06708.bicep b/services/DBforPostgreSQL/servers/templates/bicep/cpupercent_a2b3fa9d-f7e8-4d1e-967c-3d661bc06708.bicep
new file mode 100644
index 000000000..85037e236
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/bicep/cpupercent_a2b3fa9d-f7e8-4d1e-967c-3d661bc06708.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cpu_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/servers/templates/bicep/ioconsumptionpercent_ea7248bd-f96c-4391-ac48-c95312441028.bicep b/services/DBforPostgreSQL/servers/templates/bicep/ioconsumptionpercent_ea7248bd-f96c-4391-ac48-c95312441028.bicep
new file mode 100644
index 000000000..664414d7e
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/bicep/ioconsumptionpercent_ea7248bd-f96c-4391-ac48-c95312441028.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'IO percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'io_consumption_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/servers/templates/bicep/memorypercent_1d53e3ac-e98a-426c-81f1-aa1834c49692.bicep b/services/DBforPostgreSQL/servers/templates/bicep/memorypercent_1d53e3ac-e98a-426c-81f1-aa1834c49692.bicep
new file mode 100644
index 000000000..327251236
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/bicep/memorypercent_1d53e3ac-e98a-426c-81f1-aa1834c49692.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'memory_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/servers/templates/bicep/pgreplicalogdelayinseconds_90c0997a-f96e-4a34-87c7-c394c6e8b940.bicep b/services/DBforPostgreSQL/servers/templates/bicep/pgreplicalogdelayinseconds_90c0997a-f96e-4a34-87c7-c394c6e8b940.bicep
new file mode 100644
index 000000000..2deafc8f5
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/bicep/pgreplicalogdelayinseconds_90c0997a-f96e-4a34-87c7-c394c6e8b940.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Replica lag in seconds'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 60
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'pg_replica_log_delay_in_seconds'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/servers/templates/bicep/serverlogstoragepercent_56a13163-c2b6-4235-96bd-ef1e373b19ba.bicep b/services/DBforPostgreSQL/servers/templates/bicep/serverlogstoragepercent_56a13163-c2b6-4235-96bd-ef1e373b19ba.bicep
new file mode 100644
index 000000000..8a583d223
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/bicep/serverlogstoragepercent_56a13163-c2b6-4235-96bd-ef1e373b19ba.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Server Log storage percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'serverlog_storage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DBforPostgreSQL/servers/templates/bicep/storagepercent_e031f8bf-ed3f-4a41-87fe-b301c1d02367.bicep b/services/DBforPostgreSQL/servers/templates/bicep/storagepercent_e031f8bf-ed3f-4a41-87fe-b301c1d02367.bicep
new file mode 100644
index 000000000..9532a470b
--- /dev/null
+++ b/services/DBforPostgreSQL/servers/templates/bicep/storagepercent_e031f8bf-ed3f-4a41-87fe-b301c1d02367.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Storage percent'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'storage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/arm/ActivityFailedRuns_980f53cb-3eef-4263-952e-e69709e2a6e7.json b/services/DataFactory/factories/templates/arm/ActivityFailedRuns_980f53cb-3eef-4263-952e-e69709e2a6e7.json
new file mode 100644
index 000000000..9b0e20a95
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/ActivityFailedRuns_980f53cb-3eef-4263-952e-e69709e2a6e7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed activity runs metrics",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ActivityFailedRuns",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/ActivitySucceededRuns_321c2df7-c548-4e06-8729-8132b4dc3386.json b/services/DataFactory/factories/templates/arm/ActivitySucceededRuns_321c2df7-c548-4e06-8729-8132b4dc3386.json
new file mode 100644
index 000000000..ac0cf1373
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/ActivitySucceededRuns_321c2df7-c548-4e06-8729-8132b4dc3386.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Succeeded activity runs metrics",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ActivitySucceededRuns",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/FactorySizeInGbUnits_08bfad59-0c23-4e6b-b577-e325f445a2cc.json b/services/DataFactory/factories/templates/arm/FactorySizeInGbUnits_08bfad59-0c23-4e6b-b577-e325f445a2cc.json
new file mode 100644
index 000000000..42d322948
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/FactorySizeInGbUnits_08bfad59-0c23-4e6b-b577-e325f445a2cc.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total factory size (GB unit)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "6",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FactorySizeInGbUnits",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/IntegrationRuntimeAvailableMemory_e8fec7b1-ca81-48cd-a7ea-f81cc2fcb4a5.json b/services/DataFactory/factories/templates/arm/IntegrationRuntimeAvailableMemory_e8fec7b1-ca81-48cd-a7ea-f81cc2fcb4a5.json
new file mode 100644
index 000000000..6c358a8d1
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/IntegrationRuntimeAvailableMemory_e8fec7b1-ca81-48cd-a7ea-f81cc2fcb4a5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Integration runtime available memory",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IntegrationRuntimeAvailableMemory",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/IntegrationRuntimeAvailableNodeNumber_4b40d85d-f0be-41e5-9d60-ad9a99c54a41.json b/services/DataFactory/factories/templates/arm/IntegrationRuntimeAvailableNodeNumber_4b40d85d-f0be-41e5-9d60-ad9a99c54a41.json
new file mode 100644
index 000000000..7df06e1e4
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/IntegrationRuntimeAvailableNodeNumber_4b40d85d-f0be-41e5-9d60-ad9a99c54a41.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Integration runtime available node count",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IntegrationRuntimeAvailableNodeNumber",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/IntegrationRuntimeCpuPercentage_473c5450-95cc-4f86-bb8a-d0a06edd1357.json b/services/DataFactory/factories/templates/arm/IntegrationRuntimeCpuPercentage_473c5450-95cc-4f86-bb8a-d0a06edd1357.json
new file mode 100644
index 000000000..a07cd77c8
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/IntegrationRuntimeCpuPercentage_473c5450-95cc-4f86-bb8a-d0a06edd1357.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Integration runtime CPU utilization",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IntegrationRuntimeCpuPercentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/MaxAllowedFactorySizeInGbUnits_71d5d464-ae1c-4383-835f-bb7369e307ea.json b/services/DataFactory/factories/templates/arm/MaxAllowedFactorySizeInGbUnits_71d5d464-ae1c-4383-835f-bb7369e307ea.json
new file mode 100644
index 000000000..84ece4782
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/MaxAllowedFactorySizeInGbUnits_71d5d464-ae1c-4383-835f-bb7369e307ea.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Maximum allowed factory size (GB unit)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "8",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "MaxAllowedFactorySizeInGbUnits",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/MaxAllowedResourceCount_a678b284-d23b-46e4-a8fa-75bb744a53bb.json b/services/DataFactory/factories/templates/arm/MaxAllowedResourceCount_a678b284-d23b-46e4-a8fa-75bb744a53bb.json
new file mode 100644
index 000000000..01d0cd807
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/MaxAllowedResourceCount_a678b284-d23b-46e4-a8fa-75bb744a53bb.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Maximum allowed entities count",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2500000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "MaxAllowedResourceCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/PipelineCancelledRuns_f5e0a050-1994-4864-b2c3-a09dc77fb5b4.json b/services/DataFactory/factories/templates/arm/PipelineCancelledRuns_f5e0a050-1994-4864-b2c3-a09dc77fb5b4.json
new file mode 100644
index 000000000..1b106cd86
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/PipelineCancelledRuns_f5e0a050-1994-4864-b2c3-a09dc77fb5b4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Cancelled pipeline runs metrics",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PipelineCancelledRuns",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/PipelineElapsedTimeRuns_df4f3e6f-757e-4fa0-a411-b2cdf4039649.json b/services/DataFactory/factories/templates/arm/PipelineElapsedTimeRuns_df4f3e6f-757e-4fa0-a411-b2cdf4039649.json
new file mode 100644
index 000000000..a1042571f
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/PipelineElapsedTimeRuns_df4f3e6f-757e-4fa0-a411-b2cdf4039649.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Elapsed Time Pipeline Runs Metrics",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PipelineElapsedTimeRuns",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/PipelineFailedRuns_2dd0b760-3235-479d-86d4-c152ca76b7e8.json b/services/DataFactory/factories/templates/arm/PipelineFailedRuns_2dd0b760-3235-479d-86d4-c152ca76b7e8.json
new file mode 100644
index 000000000..b960fd646
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/PipelineFailedRuns_2dd0b760-3235-479d-86d4-c152ca76b7e8.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed pipeline runs metrics",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PipelineFailedRuns",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/PipelineSucceededRuns_47615ecc-bf5d-47e2-8c10-f8411e6c5d56.json b/services/DataFactory/factories/templates/arm/PipelineSucceededRuns_47615ecc-bf5d-47e2-8c10-f8411e6c5d56.json
new file mode 100644
index 000000000..e6db0d7ce
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/PipelineSucceededRuns_47615ecc-bf5d-47e2-8c10-f8411e6c5d56.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Succeeded pipeline runs metrics",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PipelineSucceededRuns",
+ "dimensions": [{"operator": "include", "name": "name", "values": ["productrecommendation"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/ResourceCount_740b104c-1ad2-4ef7-bafc-c98f22551548.json b/services/DataFactory/factories/templates/arm/ResourceCount_740b104c-1ad2-4ef7-bafc-c98f22551548.json
new file mode 100644
index 000000000..99a8916b5
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/ResourceCount_740b104c-1ad2-4ef7-bafc-c98f22551548.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total entities count",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1700000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ResourceCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/SSISIntegrationRuntimeStartFailed_5f2a0272-792a-4cdd-ba94-9f46db438a0e.json b/services/DataFactory/factories/templates/arm/SSISIntegrationRuntimeStartFailed_5f2a0272-792a-4cdd-ba94-9f46db438a0e.json
new file mode 100644
index 000000000..47527d963
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/SSISIntegrationRuntimeStartFailed_5f2a0272-792a-4cdd-ba94-9f46db438a0e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed SSIS integration runtime start metrics",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SSISIntegrationRuntimeStartFailed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/SSISPackageExecutionFailed_c30b6089-59c5-4452-b382-d33152be9b03.json b/services/DataFactory/factories/templates/arm/SSISPackageExecutionFailed_c30b6089-59c5-4452-b382-d33152be9b03.json
new file mode 100644
index 000000000..ad11ec0bc
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/SSISPackageExecutionFailed_c30b6089-59c5-4452-b382-d33152be9b03.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed SSIS package execution metrics",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SSISPackageExecutionFailed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/TriggerFailedRuns_9c7bde49-f0c2-4a07-b150-5dc9464fcf29.json b/services/DataFactory/factories/templates/arm/TriggerFailedRuns_9c7bde49-f0c2-4a07-b150-5dc9464fcf29.json
new file mode 100644
index 000000000..2eff6bd02
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/TriggerFailedRuns_9c7bde49-f0c2-4a07-b150-5dc9464fcf29.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed trigger runs metrics",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TriggerFailedRuns",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/arm/TriggerSucceededRuns_b8286cfa-9f86-4309-954b-ef69a6d8982d.json b/services/DataFactory/factories/templates/arm/TriggerSucceededRuns_b8286cfa-9f86-4309-954b-ef69a6d8982d.json
new file mode 100644
index 000000000..60e76f402
--- /dev/null
+++ b/services/DataFactory/factories/templates/arm/TriggerSucceededRuns_b8286cfa-9f86-4309-954b-ef69a6d8982d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Succeeded trigger runs metrics",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TriggerSucceededRuns",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DataFactory/factories/templates/bicep/ActivityFailedRuns_980f53cb-3eef-4263-952e-e69709e2a6e7.bicep b/services/DataFactory/factories/templates/bicep/ActivityFailedRuns_980f53cb-3eef-4263-952e-e69709e2a6e7.bicep
new file mode 100644
index 000000000..a9d6f1588
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/ActivityFailedRuns_980f53cb-3eef-4263-952e-e69709e2a6e7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed activity runs metrics'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ActivityFailedRuns'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/ActivitySucceededRuns_321c2df7-c548-4e06-8729-8132b4dc3386.bicep b/services/DataFactory/factories/templates/bicep/ActivitySucceededRuns_321c2df7-c548-4e06-8729-8132b4dc3386.bicep
new file mode 100644
index 000000000..45d533d22
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/ActivitySucceededRuns_321c2df7-c548-4e06-8729-8132b4dc3386.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Succeeded activity runs metrics'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ActivitySucceededRuns'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/FactorySizeInGbUnits_08bfad59-0c23-4e6b-b577-e325f445a2cc.bicep b/services/DataFactory/factories/templates/bicep/FactorySizeInGbUnits_08bfad59-0c23-4e6b-b577-e325f445a2cc.bicep
new file mode 100644
index 000000000..83a7710a2
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/FactorySizeInGbUnits_08bfad59-0c23-4e6b-b577-e325f445a2cc.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total factory size (GB unit)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 6
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FactorySizeInGbUnits'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/IntegrationRuntimeAvailableMemory_e8fec7b1-ca81-48cd-a7ea-f81cc2fcb4a5.bicep b/services/DataFactory/factories/templates/bicep/IntegrationRuntimeAvailableMemory_e8fec7b1-ca81-48cd-a7ea-f81cc2fcb4a5.bicep
new file mode 100644
index 000000000..2612ac2d3
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/IntegrationRuntimeAvailableMemory_e8fec7b1-ca81-48cd-a7ea-f81cc2fcb4a5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Integration runtime available memory'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IntegrationRuntimeAvailableMemory'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/IntegrationRuntimeAvailableNodeNumber_4b40d85d-f0be-41e5-9d60-ad9a99c54a41.bicep b/services/DataFactory/factories/templates/bicep/IntegrationRuntimeAvailableNodeNumber_4b40d85d-f0be-41e5-9d60-ad9a99c54a41.bicep
new file mode 100644
index 000000000..d679c5c43
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/IntegrationRuntimeAvailableNodeNumber_4b40d85d-f0be-41e5-9d60-ad9a99c54a41.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Integration runtime available node count'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IntegrationRuntimeAvailableNodeNumber'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/IntegrationRuntimeCpuPercentage_473c5450-95cc-4f86-bb8a-d0a06edd1357.bicep b/services/DataFactory/factories/templates/bicep/IntegrationRuntimeCpuPercentage_473c5450-95cc-4f86-bb8a-d0a06edd1357.bicep
new file mode 100644
index 000000000..97d6eff35
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/IntegrationRuntimeCpuPercentage_473c5450-95cc-4f86-bb8a-d0a06edd1357.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Integration runtime CPU utilization'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IntegrationRuntimeCpuPercentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/MaxAllowedFactorySizeInGbUnits_71d5d464-ae1c-4383-835f-bb7369e307ea.bicep b/services/DataFactory/factories/templates/bicep/MaxAllowedFactorySizeInGbUnits_71d5d464-ae1c-4383-835f-bb7369e307ea.bicep
new file mode 100644
index 000000000..b9c08875b
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/MaxAllowedFactorySizeInGbUnits_71d5d464-ae1c-4383-835f-bb7369e307ea.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Maximum allowed factory size (GB unit)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 8
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'MaxAllowedFactorySizeInGbUnits'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/MaxAllowedResourceCount_a678b284-d23b-46e4-a8fa-75bb744a53bb.bicep b/services/DataFactory/factories/templates/bicep/MaxAllowedResourceCount_a678b284-d23b-46e4-a8fa-75bb744a53bb.bicep
new file mode 100644
index 000000000..a47c0a78d
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/MaxAllowedResourceCount_a678b284-d23b-46e4-a8fa-75bb744a53bb.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Maximum allowed entities count'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2500000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'MaxAllowedResourceCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/PipelineCancelledRuns_f5e0a050-1994-4864-b2c3-a09dc77fb5b4.bicep b/services/DataFactory/factories/templates/bicep/PipelineCancelledRuns_f5e0a050-1994-4864-b2c3-a09dc77fb5b4.bicep
new file mode 100644
index 000000000..451244970
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/PipelineCancelledRuns_f5e0a050-1994-4864-b2c3-a09dc77fb5b4.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Cancelled pipeline runs metrics'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PipelineCancelledRuns'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/PipelineElapsedTimeRuns_df4f3e6f-757e-4fa0-a411-b2cdf4039649.bicep b/services/DataFactory/factories/templates/bicep/PipelineElapsedTimeRuns_df4f3e6f-757e-4fa0-a411-b2cdf4039649.bicep
new file mode 100644
index 000000000..2e242fa6f
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/PipelineElapsedTimeRuns_df4f3e6f-757e-4fa0-a411-b2cdf4039649.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Elapsed Time Pipeline Runs Metrics'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PipelineElapsedTimeRuns'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/PipelineFailedRuns_2dd0b760-3235-479d-86d4-c152ca76b7e8.bicep b/services/DataFactory/factories/templates/bicep/PipelineFailedRuns_2dd0b760-3235-479d-86d4-c152ca76b7e8.bicep
new file mode 100644
index 000000000..a9089e873
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/PipelineFailedRuns_2dd0b760-3235-479d-86d4-c152ca76b7e8.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed pipeline runs metrics'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PipelineFailedRuns'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/PipelineSucceededRuns_47615ecc-bf5d-47e2-8c10-f8411e6c5d56.bicep b/services/DataFactory/factories/templates/bicep/PipelineSucceededRuns_47615ecc-bf5d-47e2-8c10-f8411e6c5d56.bicep
new file mode 100644
index 000000000..fd232047f
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/PipelineSucceededRuns_47615ecc-bf5d-47e2-8c10-f8411e6c5d56.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Succeeded pipeline runs metrics'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PipelineSucceededRuns'
+ dimensions: [
+ {
+ name: 'name'
+ operator: 'include'
+ values: ['productrecommendation']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/ResourceCount_740b104c-1ad2-4ef7-bafc-c98f22551548.bicep b/services/DataFactory/factories/templates/bicep/ResourceCount_740b104c-1ad2-4ef7-bafc-c98f22551548.bicep
new file mode 100644
index 000000000..53a593b1b
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/ResourceCount_740b104c-1ad2-4ef7-bafc-c98f22551548.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total entities count'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1700000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ResourceCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/SSISIntegrationRuntimeStartFailed_5f2a0272-792a-4cdd-ba94-9f46db438a0e.bicep b/services/DataFactory/factories/templates/bicep/SSISIntegrationRuntimeStartFailed_5f2a0272-792a-4cdd-ba94-9f46db438a0e.bicep
new file mode 100644
index 000000000..bfd80b854
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/SSISIntegrationRuntimeStartFailed_5f2a0272-792a-4cdd-ba94-9f46db438a0e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed SSIS integration runtime start metrics'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SSISIntegrationRuntimeStartFailed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/SSISPackageExecutionFailed_c30b6089-59c5-4452-b382-d33152be9b03.bicep b/services/DataFactory/factories/templates/bicep/SSISPackageExecutionFailed_c30b6089-59c5-4452-b382-d33152be9b03.bicep
new file mode 100644
index 000000000..f95c9b809
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/SSISPackageExecutionFailed_c30b6089-59c5-4452-b382-d33152be9b03.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed SSIS package execution metrics'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SSISPackageExecutionFailed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/TriggerFailedRuns_9c7bde49-f0c2-4a07-b150-5dc9464fcf29.bicep b/services/DataFactory/factories/templates/bicep/TriggerFailedRuns_9c7bde49-f0c2-4a07-b150-5dc9464fcf29.bicep
new file mode 100644
index 000000000..e46596850
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/TriggerFailedRuns_9c7bde49-f0c2-4a07-b150-5dc9464fcf29.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed trigger runs metrics'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TriggerFailedRuns'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DataFactory/factories/templates/bicep/TriggerSucceededRuns_b8286cfa-9f86-4309-954b-ef69a6d8982d.bicep b/services/DataFactory/factories/templates/bicep/TriggerSucceededRuns_b8286cfa-9f86-4309-954b-ef69a6d8982d.bicep
new file mode 100644
index 000000000..96768894c
--- /dev/null
+++ b/services/DataFactory/factories/templates/bicep/TriggerSucceededRuns_b8286cfa-9f86-4309-954b-ef69a6d8982d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Succeeded trigger runs metrics'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TriggerSucceededRuns'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/Capacity85PercentxHostPoolNamex_a8e65618-c367-42bc-916a-b192ddf4c6ca.json b/services/DesktopVirtualization/hostPools/templates/arm/Capacity85PercentxHostPoolNamex_a8e65618-c367-42bc-916a-b192ddf4c6ca.json
new file mode 100644
index 000000000..0e37823c9
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/Capacity85PercentxHostPoolNamex_a8e65618-c367-42bc-916a-b192ddf4c6ca.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "This alert is based on the Action Account and Runbook that populates the Log Analytics specificed with the AVD Metrics Deployment Solution for xHostPoolNamex. -->Last Number in the string is the Percentage Remaining for the Host Pool. Output is - HostPoolName|ResourceGroup|Type|MaxSessionLimit|NumberHosts|TotalUsers|DisconnectedUser|ActiveUsers|SessionsAvailable|HostPoolPercentageLoad'",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "AzureDiagnostics | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdHostPoolLogData\" | sort by TimeGenerated | where TimeGenerated > now() - 5m | extend HostPoolName=tostring(split(ResultDescription, '|')[0]) | extend ResourceGroup=tostring(split(ResultDescription, '|')[1]) | extend Type=tostring(split(ResultDescription, '|')[2]) | extend MaxSessionLimit=toint(split(ResultDescription, '|')[3]) | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4]) | extend UserSessionsTotal=toint(split(ResultDescription, '|')[5]) | extend UserSessionsDisconnected=toint(split(ResultDescription, '|')[6]) | extend UserSessionsActive=toint(split(ResultDescription, '|')[7]) | extend UserSessionsAvailable=toint(split(ResultDescription, '|')[8]) | extend HostPoolPercentLoad=toint(split(ResultDescription, '|')[9]) | extend HPResourceId=tostring(split(ResultDescription, '|')[13]) | extend ResourceId=tostring(HPResourceId) | where HostPoolPercentLoad >= 85 and HostPoolPercentLoad < 95 | where HostPoolName =~ 'xHostPoolNamex'",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "HostPoolName", "operator": "Include", "values": ["*"]}, {"name": "UserSessionsTotal", "operator": "Include", "values": ["*"]}, {"name": "UserSessionsDisconnected", "operator": "Include", "values": ["*"]}, {"name": "UserSessionsActive", "operator": "Include", "values": ["*"]}, {"name": "UserSessionsAvailable", "operator": "Include", "values": ["*"]}, {"name": "HostPoolPercentLoad", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/Capacity95PercentxHostPoolNamex_eefabb12-9ce7-4784-911a-c7000424388e.json b/services/DesktopVirtualization/hostPools/templates/arm/Capacity95PercentxHostPoolNamex_eefabb12-9ce7-4784-911a-c7000424388e.json
new file mode 100644
index 000000000..f75699b28
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/Capacity95PercentxHostPoolNamex_eefabb12-9ce7-4784-911a-c7000424388e.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "This alert is based on the Action Account and Runbook that populates the Log Analytics specificed with the AVD Metrics Deployment Solution for xHostPoolNamex. -->Last Number in the string is the Percentage Remaining for the Host Pool. Output is - HostPoolName|ResourceGroup|Type|MaxSessionLimit|NumberHosts|TotalUsers|DisconnectedUser|ActiveUsers|SessionsAvailable|HostPoolPercentageLoad'",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "AzureDiagnostics | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdHostPoolLogData\" | sort by TimeGenerated | where TimeGenerated > now() - 5m | extend HostPoolName=tostring(split(ResultDescription, '|')[0]) | extend ResourceGroup=tostring(split(ResultDescription, '|')[1]) | extend Type=tostring(split(ResultDescription, '|')[2]) | extend MaxSessionLimit=toint(split(ResultDescription, '|')[3]) | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4]) | extend UserSessionsTotal=toint(split(ResultDescription, '|')[5]) | extend UserSessionsDisconnected=toint(split(ResultDescription, '|')[6]) | extend UserSessionsActive=toint(split(ResultDescription, '|')[7]) | extend UserSessionsAvailable=toint(split(ResultDescription, '|')[8]) | extend HostPoolPercentLoad=toint(split(ResultDescription, '|')[9]) | extend HPResourceId=tostring(split(ResultDescription, '|')[13]) | extend ResourceId=tostring(HPResourceId) | where HostPoolPercentLoad >= 95 | where HostPoolName =~ 'xHostPoolNamex'",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "HostPoolName", "operator": "Include", "values": ["*"]}, {"name": "UserSessionsTotal", "operator": "Include", "values": ["*"]}, {"name": "UserSessionsDisconnected", "operator": "Include", "values": ["*"]}, {"name": "UserSessionsActive", "operator": "Include", "values": ["*"]}, {"name": "UserSessionsAvailable", "operator": "Include", "values": ["*"]}, {"name": "HostPoolPercentLoad", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/FSLogixDiskAlreadyInUsexHostPoolNamex_edbbb4d2-00e5-4592-a489-08c2afe37506.json b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixDiskAlreadyInUsexHostPoolNamex_edbbb4d2-00e5-4592-a489-08c2afe37506.json
new file mode 100644
index 000000000..f645a32a1
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixDiskAlreadyInUsexHostPoolNamex_edbbb4d2-00e5-4592-a489-08c2afe37506.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "User Profile Service logged an Event ID 51. This indicates that a user attempted to load their profile disk but it was in use or possibly mapped to another VM. Ensure the user is not connected to another host pool or remote app with the same profile. Regarding xHostPoolNamex.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "Event | where EventLog == \"Microsoft-FSLogix-Apps/Operational\" | where EventLevelName == \"Warning\" | where EventID == 51 | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains \"xHostPoolNamex\" | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1D",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "ComputerName", "operator": "Include", "values": ["*"]}, {"name": "RenderedDescription", "operator": "Include", "values": ["*"]}, {"name": "VMresourceGroup", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/FSLogixDiskCompactFailurexHostPoolNamex_1b3f0c37-61b9-4024-8e4b-17b2279d3306.json b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixDiskCompactFailurexHostPoolNamex_1b3f0c37-61b9-4024-8e4b-17b2279d3306.json
new file mode 100644
index 000000000..5f1ca0931
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixDiskCompactFailurexHostPoolNamex_1b3f0c37-61b9-4024-8e4b-17b2279d3306.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "User Profile Service logged Event ID 62 or 63. The profile Disk was marked for compaction due to additional white space but failed. See error details for additional information regarding xHostPoolNamex.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "Event | where EventLog == \"Microsoft-FSLogix-Apps/Admin\" | where EventLevelName == \"Error\" | where EventID == 62 or EventID == 63 | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains \"xHostPoolNamex\" | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1D",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "ComputerName", "operator": "Include", "values": ["*"]}, {"name": "RenderedDescription", "operator": "Include", "values": ["*"]}, {"name": "VMresourceGroup", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/FSLogixNetworkIssuexHostPoolNamex_d11e2210-d818-43c6-9380-b0f6cd02ed6e.json b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixNetworkIssuexHostPoolNamex_d11e2210-d818-43c6-9380-b0f6cd02ed6e.json
new file mode 100644
index 000000000..c34c113b9
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixNetworkIssuexHostPoolNamex_d11e2210-d818-43c6-9380-b0f6cd02ed6e.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "User Profiles Service logged Event ID 43. Verify network communications between the storage and AVD VM related to xHostPoolNamex.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "Event | where EventLog == \"Microsoft-FSLogix-Apps/Admin\" | where EventLevelName == \"Error\" | where EventID == 43 | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains \"xHostPoolNamex\" | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1D",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "ComputerName", "operator": "Include", "values": ["*"]}, {"name": "RenderedDescription", "operator": "Include", "values": ["*"]}, {"name": "VMresourceGroup", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/FSLogixProfileDiskFailedtoAttachxHostPoolNamex_222d5a84-2439-4f76-90a2-a44161eafbb0.json b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixProfileDiskFailedtoAttachxHostPoolNamex_222d5a84-2439-4f76-90a2-a44161eafbb0.json
new file mode 100644
index 000000000..d54596f86
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixProfileDiskFailedtoAttachxHostPoolNamex_222d5a84-2439-4f76-90a2-a44161eafbb0.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "User Profiles Service logged an Event ID 52 or 40. Investigate error details for reason regarding xHostPoolNamex.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "Event | where EventLog == \"Microsoft-FSLogix-Apps/Admin\" | where EventLevelName == \"Error\" | where EventID == 42 or EventID == 40 | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains \"xHostPoolNamex\" | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1D",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "ComputerName", "operator": "Include", "values": ["*"]}, {"name": "RenderedDescription", "operator": "Include", "values": ["*"]}, {"name": "VMresourceGroup", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/FSLogixProfilelessthan2xHostPoolNamex_44d508c2-ae0c-487b-bf5f-65422a59cd63.json b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixProfilelessthan2xHostPoolNamex_44d508c2-ae0c-487b-bf5f-65422a59cd63.json
new file mode 100644
index 000000000..134620ab3
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixProfilelessthan2xHostPoolNamex_44d508c2-ae0c-487b-bf5f-65422a59cd63.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "User Profiles Service logged Event ID 34. Expand User's Virtual Profile Disk and/or clean up user profile data on the VM in xHostPoolNamex.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "Event | where EventLog == \"Microsoft-FSLogix-Apps/Admin\" | where EventLevelName == \"Error\" | where EventID == 33 | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains \"xHostPoolNamex\" | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "ComputerName", "operator": "Include", "values": ["*"]}, {"name": "RenderedDescription", "operator": "Include", "values": ["*"]}, {"name": "VMresourceGroup", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/FSLogixProfilelessthan5xHostPoolNamex_560c969e-13bd-43bf-8b07-5798f6c4a31c.json b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixProfilelessthan5xHostPoolNamex_560c969e-13bd-43bf-8b07-5798f6c4a31c.json
new file mode 100644
index 000000000..ba1ba8453
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixProfilelessthan5xHostPoolNamex_560c969e-13bd-43bf-8b07-5798f6c4a31c.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "User Profiles Service logged Event ID 33. Expand User's Virtual Profile Disk and/or clean up user profile data on the VM in xHostPoolNamex.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "Event | where EventLog == \"Microsoft-FSLogix-Apps/Admin\" | where EventLevelName == \"Warning\" | where EventID == 34 | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains \"xHostPoolNamex\" | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "ComputerName", "operator": "Include", "values": ["*"]}, {"name": "RenderedDescription", "operator": "Include", "values": ["*"]}, {"name": "VMresourceGroup", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/FSLogixServiceDisabledxHostPoolNamex_e03e4072-a5d4-46e8-b5fe-dc586ca56a86.json b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixServiceDisabledxHostPoolNamex_e03e4072-a5d4-46e8-b5fe-dc586ca56a86.json
new file mode 100644
index 000000000..5f8cc4ebe
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/FSLogixServiceDisabledxHostPoolNamex_e03e4072-a5d4-46e8-b5fe-dc586ca56a86.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "User Profile Service Disabled. Determine why service was disabled and re-enable / start the FSLogix service. Regarding xHostPoolNamex.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "Event | where EventLog == \"Microsoft-FSLogix-Apps/Admin\" | where EventLevelName == \"Warning\" | where EventID == 60 | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains \"xHostPoolNamex\" | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1D",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "ComputerName", "operator": "Include", "values": ["*"]}, {"name": "RenderedDescription", "operator": "Include", "values": ["*"]}, {"name": "VMresourceGroup", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/LocalDiskSpacelessthan10xHostPoolNamex_1749f4f8-e4cd-4bc8-b2f8-7aa9b98095da.json b/services/DesktopVirtualization/hostPools/templates/arm/LocalDiskSpacelessthan10xHostPoolNamex_1749f4f8-e4cd-4bc8-b2f8-7aa9b98095da.json
new file mode 100644
index 000000000..aa31f1c2a
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/LocalDiskSpacelessthan10xHostPoolNamex_1749f4f8-e4cd-4bc8-b2f8-7aa9b98095da.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Disk space Moderately Low. \nConsider review of the VM local C drive and determine what is consuming disk space for the VM in xHostPoolNamex. This could be local profiles or temp files that need to be cleaned up or removed.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "Perf | where TimeGenerated > ago(15m) | where ObjectName == \"LogicalDisk\" and CounterName == \"% Free Space\" | where InstanceName !contains \"D:\" | where InstanceName !contains \"_Total\" | where CounterValue <= 10.00 | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName | summarize arg_max(TimeGenerated, *) by ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, CounterValue, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where TimeGenerated > ago(15m) | where _ResourceId contains \"xHostPoolNamex\" | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool, _ResourceId ) on ComputerName | where ComputerName1 contains ComputerName",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "ComputerName", "operator": "Include", "values": ["*"]}, {"name": "VMresourceGroup", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/LocalDiskSpacelessthan5xHostPoolNamex_2f25b89a-6c5b-4a74-9584-31fe13802d3c.json b/services/DesktopVirtualization/hostPools/templates/arm/LocalDiskSpacelessthan5xHostPoolNamex_2f25b89a-6c5b-4a74-9584-31fe13802d3c.json
new file mode 100644
index 000000000..2a2849014
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/LocalDiskSpacelessthan5xHostPoolNamex_2f25b89a-6c5b-4a74-9584-31fe13802d3c.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Disk space Moderately Low. \nConsider review of the VM local C drive and determine what is consuming disk space for the VM in xHostPoolNamex. This could be local profiles or temp files that need to be cleaned up or removed.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "Perf | where TimeGenerated > ago(15m) | where ObjectName == \"LogicalDisk\" and CounterName == \"% Free Space\" | where InstanceName !contains \"D:\" | where InstanceName !contains \"_Total\" | where CounterValue <= 5.00 | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName | summarize arg_max(TimeGenerated, *) by ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, CounterValue, subscription, ResourceGroup, TimeGenerated | join kind = leftouter ( WVDAgentHealthStatus | where TimeGenerated > ago(15m) | where _ResourceId contains \"xHostPoolNamex\" | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool, _ResourceId ) on ComputerName | where ComputerName1 contains ComputerName",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "ComputerName", "operator": "Include", "values": ["*"]}, {"name": "VMresourceGroup", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/NoResourcesAvailablexHostPoolNamex_691468ac-c0a5-45cf-81d1-41032c7c766a.json b/services/DesktopVirtualization/hostPools/templates/arm/NoResourcesAvailablexHostPoolNamex_691468ac-c0a5-45cf-81d1-41032c7c766a.json
new file mode 100644
index 000000000..a046c9b71
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/NoResourcesAvailablexHostPoolNamex_691468ac-c0a5-45cf-81d1-41032c7c766a.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Catastrophic Event! Indicates potential problems with dependencies, diagnose and resolve for xHostPoolNamex.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "WVDConnections | where TimeGenerated > ago (15m) | where _ResourceId contains \"xHostPoolNamex\" | project-away TenantId,SourceSystem | summarize arg_max(TimeGenerated, *), StartTime = min(iff(State== \\'Started\\', TimeGenerated , datetime(null) )), ConnectTime = min(iff(State== \\'Connected\\', TimeGenerated , datetime(null) )) by CorrelationId | join kind=leftouter (WVDErrors |summarize Errors=makelist(pack(\\'Code\\', Code, \\'CodeSymbolic\\', CodeSymbolic, \\'Time\\', TimeGenerated, \\'Message\\', Message ,\\'ServiceError\\', ServiceError, \\'Source\\', Source)) by CorrelationId ) on CorrelationId | join kind=leftouter (WVDCheckpoints | summarize Checkpoints=makelist(pack(\\'Time\\', TimeGenerated, \\'Name\\', Name, \\'Parameters\\', Parameters, \\'Source\\', Source)) by CorrelationId | mv-apply Checkpoints on ( order by todatetime(Checkpoints[\\'Time\\']) asc | summarize Checkpoints=makelist(Checkpoints)) ) on CorrelationId | project-away CorrelationId1, CorrelationId2 | order by TimeGenerated desc | where Errors[0].CodeSymbolic == \"ConnectionFailedNoHealthyRdshAvailable\"",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "UserName", "operator": "Include", "values": ["*"]}, {"name": "SessionHostName", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/PersonalDesktopAssignedHealthcheckFailurexHostPoolNamex_55c5591a-60bb-48a0-bdd5-4c35f6293278.json b/services/DesktopVirtualization/hostPools/templates/arm/PersonalDesktopAssignedHealthcheckFailurexHostPoolNamex_55c5591a-60bb-48a0-bdd5-4c35f6293278.json
new file mode 100644
index 000000000..91a41bd92
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/PersonalDesktopAssignedHealthcheckFailurexHostPoolNamex_55c5591a-60bb-48a0-bdd5-4c35f6293278.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "VM is assigned to a user but one of the dependent resources is in a failed state for hostpool xHostPoolNamex. This alert relies on the runbook AvdHostPoolLogData.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "AzureDiagnostics | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdHostPoolLogData\" | sort by TimeGenerated | where TimeGenerated > ago(15m) | extend HostPoolName=tostring(split(ResultDescription, '|')[0]) | extend ResourceGroup=tostring(split(ResultDescription, '|')[1]) | extend Type=tostring(split(ResultDescription, '|')[2]) | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4]) | extend UserSessionsActive=toint(split(ResultDescription, '|')[7]) | extend NumPersonalUnhealthy=toint(split(ResultDescription, '|')[10]) | extend PersonalSessionHost=extract_json(\"$.SessionHost\", tostring(split(ResultDescription, '|')[11]), typeof(string)) | extend PersonalAssignedUser=extract_json(\"$.AssignedUser\", tostring(split(ResultDescription, '|')[11]), typeof(string)) | where HostPoolName =~ 'xHostPoolNamex' | where Type == 'Personal' | where NumPersonalUnhealthy > 0 ",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "SessionHostName", "operator": "Include", "values": ["*"]}, {"name": "HealthCheckDesc", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}, {"name": "SessionHostRG", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/SessionHostHealthcheckFailurexHostPoolNamex_c87ad0cd-e867-4d18-b61c-ec2a092ef459.json b/services/DesktopVirtualization/hostPools/templates/arm/SessionHostHealthcheckFailurexHostPoolNamex_c87ad0cd-e867-4d18-b61c-ec2a092ef459.json
new file mode 100644
index 000000000..917f2b9bd
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/SessionHostHealthcheckFailurexHostPoolNamex_c87ad0cd-e867-4d18-b61c-ec2a092ef459.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "VM is available for use but one of the dependent resources is in a failed state for hostpool xHostPoolNamex.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "let MapToDesc = (idx: long) { case(idx == 0, \"DomainJoin\", idx == 1, \"DomainTrust\", idx == 2, \"FSLogix\", idx == 3, \"SxSStack\", idx == 4, \"URLCheck\", idx == 5, \"GenevaAgent\", idx == 6, \"DomainReachable\", idx == 7, \"WebRTCRedirector\", idx == 8, \"SxSStackEncryption\", idx == 9, \"IMDSReachable\", idx == 10, \"MSIXPackageStaging\", \"InvalidIndex\")}; WVDAgentHealthStatus | where TimeGenerated > ago(10m) | where Status != \\'Available\\' | where AllowNewSessions = True | extend CheckFailed = parse_json(SessionHostHealthCheckResult) | mv-expand CheckFailed | where CheckFailed.AdditionalFailureDetails.ErrorCode != 0 | extend HealthCheckName = tolong(CheckFailed.HealthCheckName) | extend HealthCheckResult = tolong(CheckFailed.HealthCheckResult) | extend HealthCheckDesc = MapToDesc(HealthCheckName) | where HealthCheckDesc != \\'InvalidIndex\\' | where _ResourceId contains \"xHostPoolNamex\" | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" HostPoolResourceGroup \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool | parse SessionHostResourceId with \"/subscriptions/\" HostSubscription \"/resourceGroups/\" SessionHostRG \" /providers/Microsoft.Compute/virtualMachines/\" SessionHostName",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "SessionHostName", "operator": "Include", "values": ["*"]}, {"name": "HealthCheckDesc", "operator": "Include", "values": ["*"]}, {"name": "HostPool", "operator": "Include", "values": ["*"]}, {"name": "SessionHostRG", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/UserConnectiontoSessionHostFailurexHostPoolNamex_1f0258f8-bc06-4593-9d77-eba879f5b62d.json b/services/DesktopVirtualization/hostPools/templates/arm/UserConnectiontoSessionHostFailurexHostPoolNamex_1f0258f8-bc06-4593-9d77-eba879f5b62d.json
new file mode 100644
index 000000000..b5057c39f
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/UserConnectiontoSessionHostFailurexHostPoolNamex_1f0258f8-bc06-4593-9d77-eba879f5b62d.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "While trying to connect to xHostPoolNamex a user had an error and failed to connect to a VM. There are lots of variables between the end uers and AVD VMs. If this is frequent for the user, determine if their Internet connection is slow or latency is over 150 ms. Regarding xHostPoolNamex.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "WVDConnections // | where UserName == \"upn.here@contoso.com\" | project-away TenantId,SourceSystem | summarize arg_max(TimeGenerated, *), StartTime = min(iff(State=='Started', TimeGenerated , datetime(null) )), ConnectTime = min(iff(State=='Connected', TimeGenerated , datetime(null) )) by CorrelationId | join kind=leftouter (WVDErrors |summarize Errors=make_list(pack('Code', Code, 'CodeSymbolic', CodeSymbolic, 'Time', TimeGenerated, 'Message', Message ,'ServiceError', ServiceError, 'Source', Source)) by CorrelationId ) on CorrelationId | join kind=leftouter (WVDCheckpoints | summarize Checkpoints=make_list(pack('Time', TimeGenerated, 'Name', Name, 'Parameters', Parameters, 'Source', Source)) by CorrelationId | mv-apply Checkpoints on ( order by todatetime(Checkpoints['Time']) asc | summarize Checkpoints=make_list(Checkpoints)) ) on CorrelationId | project-away CorrelationId1, CorrelationId2 | order by TimeGenerated desc | where TimeGenerated > ago(15m) | extend ResourceGroup=tostring(split(_ResourceId, '/')[4]) | extend HostPool=tostring(split(_ResourceId, '/')[8]) | where HostPool =~ 'xHostPoolNamex' | extend ErrorShort=tostring(Errors[0].CodeSymbolic) | extend ErrorMessage=tostring(Errors[0].Message) | project TimeGenerated, HostPool, ResourceGroup, UserName, ClientOS, ClientVersion, ClientSideIPAddress, ConnectionType, ErrorShort, ErrorMessage",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "HostPool", "operator": "Include", "values": ["*"]}, {"name": "ResourceGroup", "operator": "Include", "values": ["*"]}, {"name": "UserName", "operator": "Include", "values": ["*"]}, {"name": "ClientOS", "operator": "Include", "values": ["*"]}, {"name": "ClientVersion", "operator": "Include", "values": ["*"]}, {"name": "ClientSideIPAddress", "operator": "Include", "values": ["*"]}, {"name": "ConnectionType", "operator": "Include", "values": ["*"]}, {"name": "ErrorShort", "operator": "Include", "values": ["*"]}, {"name": "ErrorMessage", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/UserDisconnectedover24hxHostPoolNamex_b31d7620-f79b-4a44-b4f6-e96563040ea4.json b/services/DesktopVirtualization/hostPools/templates/arm/UserDisconnectedover24hxHostPoolNamex_b31d7620-f79b-4a44-b4f6-e96563040ea4.json
new file mode 100644
index 000000000..5d83ac094
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/UserDisconnectedover24hxHostPoolNamex_b31d7620-f79b-4a44-b4f6-e96563040ea4.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Verify Remote Desktop Policies are applied relating to Session Limits for xHostPoolNamex. This could impact your scaling plan as well.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "WVDConnections | where TimeGenerated > ago(24h) | where State == \"Connected\" | where _ResourceId contains \"xHostPoolNamex\" | project CorrelationId , UserName, ConnectionType, StartTime=TimeGenerated, SessionHostName | join (WVDConnections | where State == \"Completed\" | project EndTime=TimeGenerated, CorrelationId) on CorrelationId | project Duration = EndTime - StartTime, ConnectionType, UserName, SessionHostName | where Duration >= timespan(24:00:00) | sort by Duration desc",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "UserName", "operator": "Include", "values": ["*"]}, {"name": "SessionHostName", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/arm/UserDisconnectedover72hxHostPoolNamex_c2c03bd2-0b7c-43cb-9e83-9da78cc4eb6e.json b/services/DesktopVirtualization/hostPools/templates/arm/UserDisconnectedover72hxHostPoolNamex_c2c03bd2-0b7c-43cb-9e83-9da78cc4eb6e.json
new file mode 100644
index 000000000..bd61b44fb
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/arm/UserDisconnectedover72hxHostPoolNamex_c2c03bd2-0b7c-43cb-9e83-9da78cc4eb6e.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Verify Remote Desktop Policies are applied relating to Session Limits for xHostPoolNamex. This could impact your scaling plan as well.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": "WVDConnections | where TimeGenerated > ago(24h) | where State == \"Connected\" | where _ResourceId contains \"xHostPoolNamex\" | project CorrelationId , UserName, ConnectionType, StartTime=TimeGenerated, SessionHostName | join (WVDConnections | where State == \"Completed\" | project EndTime=TimeGenerated, CorrelationId) on CorrelationId | project Duration = EndTime - StartTime, ConnectionType, UserName, SessionHostName | where Duration >= timespan(72:00:00) | sort by Duration desc",
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "_ResourceId",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": [{"name": "UserName", "operator": "Include", "values": ["*"]}, {"name": "SessionHostName", "operator": "Include", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/Capacity85PercentxHostPoolNamex_a8e65618-c367-42bc-916a-b192ddf4c6ca.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/Capacity85PercentxHostPoolNamex_a8e65618-c367-42bc-916a-b192ddf4c6ca.bicep
new file mode 100644
index 000000000..cae6ef504
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/Capacity85PercentxHostPoolNamex_a8e65618-c367-42bc-916a-b192ddf4c6ca.bicep
@@ -0,0 +1,198 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'This alert is based on the Action Account and Runbook that populates the Log Analytics specificed with the AVD Metrics Deployment Solution for xHostPoolNamex. -->Last Number in the string is the Percentage Remaining for the Host Pool. Output is - HostPoolName|ResourceGroup|Type|MaxSessionLimit|NumberHosts|TotalUsers|DisconnectedUser|ActiveUsers|SessionsAvailable|HostPoolPercentageLoad''
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'AzureDiagnostics | where Category has "JobStreams" and StreamType_s == "Output" and RunbookName_s == "AvdHostPoolLogData" | sort by TimeGenerated | where TimeGenerated > now() - 5m | extend HostPoolName=tostring(split(ResultDescription, \'|\')[0]) | extend ResourceGroup=tostring(split(ResultDescription, \'|\')[1]) | extend Type=tostring(split(ResultDescription, \'|\')[2]) | extend MaxSessionLimit=toint(split(ResultDescription, \'|\')[3]) | extend NumberSessionHosts=toint(split(ResultDescription, \'|\')[4]) | extend UserSessionsTotal=toint(split(ResultDescription, \'|\')[5]) | extend UserSessionsDisconnected=toint(split(ResultDescription, \'|\')[6]) | extend UserSessionsActive=toint(split(ResultDescription, \'|\')[7]) | extend UserSessionsAvailable=toint(split(ResultDescription, \'|\')[8]) | extend HostPoolPercentLoad=toint(split(ResultDescription, \'|\')[9]) | extend HPResourceId=tostring(split(ResultDescription, \'|\')[13]) | extend ResourceId=tostring(HPResourceId) | where HostPoolPercentLoad >= 85 and HostPoolPercentLoad < 95 | where HostPoolName =~ \'xHostPoolNamex\''
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = 'ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'HostPoolName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'UserSessionsTotal'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'UserSessionsDisconnected'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'UserSessionsActive'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'UserSessionsAvailable'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPoolPercentLoad'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/Capacity95PercentxHostPoolNamex_eefabb12-9ce7-4784-911a-c7000424388e.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/Capacity95PercentxHostPoolNamex_eefabb12-9ce7-4784-911a-c7000424388e.bicep
new file mode 100644
index 000000000..80115f71c
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/Capacity95PercentxHostPoolNamex_eefabb12-9ce7-4784-911a-c7000424388e.bicep
@@ -0,0 +1,198 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'This alert is based on the Action Account and Runbook that populates the Log Analytics specificed with the AVD Metrics Deployment Solution for xHostPoolNamex. -->Last Number in the string is the Percentage Remaining for the Host Pool. Output is - HostPoolName|ResourceGroup|Type|MaxSessionLimit|NumberHosts|TotalUsers|DisconnectedUser|ActiveUsers|SessionsAvailable|HostPoolPercentageLoad''
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'AzureDiagnostics | where Category has "JobStreams" and StreamType_s == "Output" and RunbookName_s == "AvdHostPoolLogData" | sort by TimeGenerated | where TimeGenerated > now() - 5m | extend HostPoolName=tostring(split(ResultDescription, \'|\')[0]) | extend ResourceGroup=tostring(split(ResultDescription, \'|\')[1]) | extend Type=tostring(split(ResultDescription, \'|\')[2]) | extend MaxSessionLimit=toint(split(ResultDescription, \'|\')[3]) | extend NumberSessionHosts=toint(split(ResultDescription, \'|\')[4]) | extend UserSessionsTotal=toint(split(ResultDescription, \'|\')[5]) | extend UserSessionsDisconnected=toint(split(ResultDescription, \'|\')[6]) | extend UserSessionsActive=toint(split(ResultDescription, \'|\')[7]) | extend UserSessionsAvailable=toint(split(ResultDescription, \'|\')[8]) | extend HostPoolPercentLoad=toint(split(ResultDescription, \'|\')[9]) | extend HPResourceId=tostring(split(ResultDescription, \'|\')[13]) | extend ResourceId=tostring(HPResourceId) | where HostPoolPercentLoad >= 95 | where HostPoolName =~ \'xHostPoolNamex\''
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = 'ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'HostPoolName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'UserSessionsTotal'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'UserSessionsDisconnected'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'UserSessionsActive'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'UserSessionsAvailable'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPoolPercentLoad'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixDiskAlreadyInUsexHostPoolNamex_edbbb4d2-00e5-4592-a489-08c2afe37506.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixDiskAlreadyInUsexHostPoolNamex_edbbb4d2-00e5-4592-a489-08c2afe37506.bicep
new file mode 100644
index 000000000..cd5cb0b19
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixDiskAlreadyInUsexHostPoolNamex_edbbb4d2-00e5-4592-a489-08c2afe37506.bicep
@@ -0,0 +1,188 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'User Profile Service logged an Event ID 51. This indicates that a user attempted to load their profile disk but it was in use or possibly mapped to another VM. Ensure the user is not connected to another host pool or remote app with the same profile. Regarding xHostPoolNamex.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'Event | where EventLog == "Microsoft-FSLogix-Apps/Operational" | where EventLevelName == "Warning" | where EventID == 51 | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup "/providers/microsoft.compute/virtualmachines/" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains "xHostPoolNamex" | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/" ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/" HostPool | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/" VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = ''
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1D'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'ComputerName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'RenderedDescription'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'VMresourceGroup'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixDiskCompactFailurexHostPoolNamex_1b3f0c37-61b9-4024-8e4b-17b2279d3306.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixDiskCompactFailurexHostPoolNamex_1b3f0c37-61b9-4024-8e4b-17b2279d3306.bicep
new file mode 100644
index 000000000..7ddabb1a3
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixDiskCompactFailurexHostPoolNamex_1b3f0c37-61b9-4024-8e4b-17b2279d3306.bicep
@@ -0,0 +1,188 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'User Profile Service logged Event ID 62 or 63. The profile Disk was marked for compaction due to additional white space but failed. See error details for additional information regarding xHostPoolNamex.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'Event | where EventLog == "Microsoft-FSLogix-Apps/Admin" | where EventLevelName == "Error" | where EventID == 62 or EventID == 63 | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup "/providers/microsoft.compute/virtualmachines/" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains "xHostPoolNamex" | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/" ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/" HostPool | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/" VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = ''
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1D'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'ComputerName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'RenderedDescription'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'VMresourceGroup'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixNetworkIssuexHostPoolNamex_d11e2210-d818-43c6-9380-b0f6cd02ed6e.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixNetworkIssuexHostPoolNamex_d11e2210-d818-43c6-9380-b0f6cd02ed6e.bicep
new file mode 100644
index 000000000..f527a8d6f
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixNetworkIssuexHostPoolNamex_d11e2210-d818-43c6-9380-b0f6cd02ed6e.bicep
@@ -0,0 +1,188 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'User Profiles Service logged Event ID 43. Verify network communications between the storage and AVD VM related to xHostPoolNamex.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'Event | where EventLog == "Microsoft-FSLogix-Apps/Admin" | where EventLevelName == "Error" | where EventID == 43 | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup "/providers/microsoft.compute/virtualmachines/" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains "xHostPoolNamex" | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/" ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/" HostPool | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/" VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = ''
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1D'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'ComputerName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'RenderedDescription'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'VMresourceGroup'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixProfileDiskFailedtoAttachxHostPoolNamex_222d5a84-2439-4f76-90a2-a44161eafbb0.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixProfileDiskFailedtoAttachxHostPoolNamex_222d5a84-2439-4f76-90a2-a44161eafbb0.bicep
new file mode 100644
index 000000000..915b9c0bd
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixProfileDiskFailedtoAttachxHostPoolNamex_222d5a84-2439-4f76-90a2-a44161eafbb0.bicep
@@ -0,0 +1,188 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'User Profiles Service logged an Event ID 52 or 40. Investigate error details for reason regarding xHostPoolNamex.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'Event | where EventLog == "Microsoft-FSLogix-Apps/Admin" | where EventLevelName == "Error" | where EventID == 42 or EventID == 40 | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup "/providers/microsoft.compute/virtualmachines/" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains "xHostPoolNamex" | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/" ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/" HostPool | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/" VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = ''
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1D'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'ComputerName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'RenderedDescription'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'VMresourceGroup'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixProfilelessthan2xHostPoolNamex_44d508c2-ae0c-487b-bf5f-65422a59cd63.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixProfilelessthan2xHostPoolNamex_44d508c2-ae0c-487b-bf5f-65422a59cd63.bicep
new file mode 100644
index 000000000..fc9be28a6
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixProfilelessthan2xHostPoolNamex_44d508c2-ae0c-487b-bf5f-65422a59cd63.bicep
@@ -0,0 +1,188 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'User Profiles Service logged Event ID 34. Expand User's Virtual Profile Disk and/or clean up user profile data on the VM in xHostPoolNamex.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'Event | where EventLog == "Microsoft-FSLogix-Apps/Admin" | where EventLevelName == "Error" | where EventID == 33 | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup "/providers/microsoft.compute/virtualmachines/" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains "xHostPoolNamex" | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/" ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/" HostPool | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/" VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = ''
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'ComputerName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'RenderedDescription'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'VMresourceGroup'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixProfilelessthan5xHostPoolNamex_560c969e-13bd-43bf-8b07-5798f6c4a31c.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixProfilelessthan5xHostPoolNamex_560c969e-13bd-43bf-8b07-5798f6c4a31c.bicep
new file mode 100644
index 000000000..db3a08b42
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixProfilelessthan5xHostPoolNamex_560c969e-13bd-43bf-8b07-5798f6c4a31c.bicep
@@ -0,0 +1,188 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'User Profiles Service logged Event ID 33. Expand User's Virtual Profile Disk and/or clean up user profile data on the VM in xHostPoolNamex.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'Event | where EventLog == "Microsoft-FSLogix-Apps/Admin" | where EventLevelName == "Warning" | where EventID == 34 | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup "/providers/microsoft.compute/virtualmachines/" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains "xHostPoolNamex" | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/" ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/" HostPool | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/" VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = ''
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'ComputerName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'RenderedDescription'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'VMresourceGroup'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixServiceDisabledxHostPoolNamex_e03e4072-a5d4-46e8-b5fe-dc586ca56a86.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixServiceDisabledxHostPoolNamex_e03e4072-a5d4-46e8-b5fe-dc586ca56a86.bicep
new file mode 100644
index 000000000..d6adc57a6
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/FSLogixServiceDisabledxHostPoolNamex_e03e4072-a5d4-46e8-b5fe-dc586ca56a86.bicep
@@ -0,0 +1,188 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'User Profile Service Disabled. Determine why service was disabled and re-enable / start the FSLogix service. Regarding xHostPoolNamex.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'Event | where EventLog == "Microsoft-FSLogix-Apps/Admin" | where EventLevelName == "Warning" | where EventID == 60 | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup "/providers/microsoft.compute/virtualmachines/" ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where _ResourceId contains "xHostPoolNamex" | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/" ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/" HostPool | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/" VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool ) on ComputerName'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = ''
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1D'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'ComputerName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'RenderedDescription'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'VMresourceGroup'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/LocalDiskSpacelessthan10xHostPoolNamex_1749f4f8-e4cd-4bc8-b2f8-7aa9b98095da.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/LocalDiskSpacelessthan10xHostPoolNamex_1749f4f8-e4cd-4bc8-b2f8-7aa9b98095da.bicep
new file mode 100644
index 000000000..a519e6436
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/LocalDiskSpacelessthan10xHostPoolNamex_1749f4f8-e4cd-4bc8-b2f8-7aa9b98095da.bicep
@@ -0,0 +1,183 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Disk space Moderately Low. \nConsider review of the VM local C drive and determine what is consuming disk space for the VM in xHostPoolNamex. This could be local profiles or temp files that need to be cleaned up or removed.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'Perf | where TimeGenerated > ago(15m) | where ObjectName == "LogicalDisk" and CounterName == "% Free Space" | where InstanceName !contains "D:" | where InstanceName !contains "_Total" | where CounterValue <= 10.00 | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup "/providers/microsoft.compute/virtualmachines/" ComputerName | summarize arg_max(TimeGenerated, *) by ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, CounterValue, subscription, ResourceGroup, TimeGenerated | join kind = leftouter (WVDAgentHealthStatus | where TimeGenerated > ago(15m) | where _ResourceId contains "xHostPoolNamex" | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/" ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/" HostPool | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/" VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool, _ResourceId ) on ComputerName | where ComputerName1 contains ComputerName'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'ComputerName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'VMresourceGroup'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/LocalDiskSpacelessthan5xHostPoolNamex_2f25b89a-6c5b-4a74-9584-31fe13802d3c.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/LocalDiskSpacelessthan5xHostPoolNamex_2f25b89a-6c5b-4a74-9584-31fe13802d3c.bicep
new file mode 100644
index 000000000..8c453d536
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/LocalDiskSpacelessthan5xHostPoolNamex_2f25b89a-6c5b-4a74-9584-31fe13802d3c.bicep
@@ -0,0 +1,183 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Disk space Moderately Low. \nConsider review of the VM local C drive and determine what is consuming disk space for the VM in xHostPoolNamex. This could be local profiles or temp files that need to be cleaned up or removed.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'Perf | where TimeGenerated > ago(15m) | where ObjectName == "LogicalDisk" and CounterName == "% Free Space" | where InstanceName !contains "D:" | where InstanceName !contains "_Total" | where CounterValue <= 5.00 | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup "/providers/microsoft.compute/virtualmachines/" ComputerName | summarize arg_max(TimeGenerated, *) by ComputerName | extend ComputerName=tolower(ComputerName) | project ComputerName, CounterValue, subscription, ResourceGroup, TimeGenerated | join kind = leftouter ( WVDAgentHealthStatus | where TimeGenerated > ago(15m) | where _ResourceId contains "xHostPoolNamex" | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/" ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/" HostPool | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/" VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName | extend ComputerName=tolower(ComputerName) | summarize arg_max(TimeGenerated,*) by ComputerName | project VMresourceGroup, ComputerName, HostPool, _ResourceId ) on ComputerName | where ComputerName1 contains ComputerName'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'ComputerName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'VMresourceGroup'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/NoResourcesAvailablexHostPoolNamex_691468ac-c0a5-45cf-81d1-41032c7c766a.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/NoResourcesAvailablexHostPoolNamex_691468ac-c0a5-45cf-81d1-41032c7c766a.bicep
new file mode 100644
index 000000000..509460123
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/NoResourcesAvailablexHostPoolNamex_691468ac-c0a5-45cf-81d1-41032c7c766a.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Catastrophic Event! Indicates potential problems with dependencies, diagnose and resolve for xHostPoolNamex.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'WVDConnections | where TimeGenerated > ago (15m) | where _ResourceId contains "xHostPoolNamex" | project-away TenantId,SourceSystem | summarize arg_max(TimeGenerated, *), StartTime = min(iff(State== \\'Started\\', TimeGenerated , datetime(null) )), ConnectTime = min(iff(State== \\'Connected\\', TimeGenerated , datetime(null) )) by CorrelationId | join kind=leftouter (WVDErrors |summarize Errors=makelist(pack(\\'Code\\', Code, \\'CodeSymbolic\\', CodeSymbolic, \\'Time\\', TimeGenerated, \\'Message\\', Message ,\\'ServiceError\\', ServiceError, \\'Source\\', Source)) by CorrelationId ) on CorrelationId | join kind=leftouter (WVDCheckpoints | summarize Checkpoints=makelist(pack(\\'Time\\', TimeGenerated, \\'Name\\', Name, \\'Parameters\\', Parameters, \\'Source\\', Source)) by CorrelationId | mv-apply Checkpoints on ( order by todatetime(Checkpoints[\\'Time\\']) asc | summarize Checkpoints=makelist(Checkpoints)) ) on CorrelationId | project-away CorrelationId1, CorrelationId2 | order by TimeGenerated desc | where Errors[0].CodeSymbolic == "ConnectionFailedNoHealthyRdshAvailable"'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'UserName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'SessionHostName'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/PersonalDesktopAssignedHealthcheckFailurexHostPoolNamex_55c5591a-60bb-48a0-bdd5-4c35f6293278.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/PersonalDesktopAssignedHealthcheckFailurexHostPoolNamex_55c5591a-60bb-48a0-bdd5-4c35f6293278.bicep
new file mode 100644
index 000000000..ff6c1aba0
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/PersonalDesktopAssignedHealthcheckFailurexHostPoolNamex_55c5591a-60bb-48a0-bdd5-4c35f6293278.bicep
@@ -0,0 +1,188 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'VM is assigned to a user but one of the dependent resources is in a failed state for hostpool xHostPoolNamex. This alert relies on the runbook AvdHostPoolLogData.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'AzureDiagnostics | where Category has "JobStreams" and StreamType_s == "Output" and RunbookName_s == "AvdHostPoolLogData" | sort by TimeGenerated | where TimeGenerated > ago(15m) | extend HostPoolName=tostring(split(ResultDescription, \'|\')[0]) | extend ResourceGroup=tostring(split(ResultDescription, \'|\')[1]) | extend Type=tostring(split(ResultDescription, \'|\')[2]) | extend NumberSessionHosts=toint(split(ResultDescription, \'|\')[4]) | extend UserSessionsActive=toint(split(ResultDescription, \'|\')[7]) | extend NumPersonalUnhealthy=toint(split(ResultDescription, \'|\')[10]) | extend PersonalSessionHost=extract_json("$.SessionHost", tostring(split(ResultDescription, \'|\')[11]), typeof(string)) | extend PersonalAssignedUser=extract_json("$.AssignedUser", tostring(split(ResultDescription, \'|\')[11]), typeof(string)) | where HostPoolName =~ \'xHostPoolNamex\' | where Type == \'Personal\' | where NumPersonalUnhealthy > 0 '
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = ''
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'SessionHostName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HealthCheckDesc'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'SessionHostRG'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/SessionHostHealthcheckFailurexHostPoolNamex_c87ad0cd-e867-4d18-b61c-ec2a092ef459.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/SessionHostHealthcheckFailurexHostPoolNamex_c87ad0cd-e867-4d18-b61c-ec2a092ef459.bicep
new file mode 100644
index 000000000..60799bf5b
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/SessionHostHealthcheckFailurexHostPoolNamex_c87ad0cd-e867-4d18-b61c-ec2a092ef459.bicep
@@ -0,0 +1,188 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'VM is available for use but one of the dependent resources is in a failed state for hostpool xHostPoolNamex.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'let MapToDesc = (idx: long) { case(idx == 0, "DomainJoin", idx == 1, "DomainTrust", idx == 2, "FSLogix", idx == 3, "SxSStack", idx == 4, "URLCheck", idx == 5, "GenevaAgent", idx == 6, "DomainReachable", idx == 7, "WebRTCRedirector", idx == 8, "SxSStackEncryption", idx == 9, "IMDSReachable", idx == 10, "MSIXPackageStaging", "InvalidIndex")}; WVDAgentHealthStatus | where TimeGenerated > ago(10m) | where Status != \\'Available\\' | where AllowNewSessions = True | extend CheckFailed = parse_json(SessionHostHealthCheckResult) | mv-expand CheckFailed | where CheckFailed.AdditionalFailureDetails.ErrorCode != 0 | extend HealthCheckName = tolong(CheckFailed.HealthCheckName) | extend HealthCheckResult = tolong(CheckFailed.HealthCheckResult) | extend HealthCheckDesc = MapToDesc(HealthCheckName) | where HealthCheckDesc != \\'InvalidIndex\\' | where _ResourceId contains "xHostPoolNamex" | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" HostPoolResourceGroup "/providers/microsoft.desktopvirtualization/hostpools/" HostPool | parse SessionHostResourceId with "/subscriptions/" HostSubscription "/resourceGroups/" SessionHostRG " /providers/Microsoft.Compute/virtualMachines/" SessionHostName'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = ''
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'SessionHostName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HealthCheckDesc'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'SessionHostRG'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/UserConnectiontoSessionHostFailurexHostPoolNamex_1f0258f8-bc06-4593-9d77-eba879f5b62d.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/UserConnectiontoSessionHostFailurexHostPoolNamex_1f0258f8-bc06-4593-9d77-eba879f5b62d.bicep
new file mode 100644
index 000000000..d4714481d
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/UserConnectiontoSessionHostFailurexHostPoolNamex_1f0258f8-bc06-4593-9d77-eba879f5b62d.bicep
@@ -0,0 +1,213 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'While trying to connect to xHostPoolNamex a user had an error and failed to connect to a VM. There are lots of variables between the end uers and AVD VMs. If this is frequent for the user, determine if their Internet connection is slow or latency is over 150 ms. Regarding xHostPoolNamex.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'WVDConnections // | where UserName == "upn.here@contoso.com" | project-away TenantId,SourceSystem | summarize arg_max(TimeGenerated, *), StartTime = min(iff(State==\'Started\', TimeGenerated , datetime(null) )), ConnectTime = min(iff(State==\'Connected\', TimeGenerated , datetime(null) )) by CorrelationId | join kind=leftouter (WVDErrors |summarize Errors=make_list(pack(\'Code\', Code, \'CodeSymbolic\', CodeSymbolic, \'Time\', TimeGenerated, \'Message\', Message ,\'ServiceError\', ServiceError, \'Source\', Source)) by CorrelationId ) on CorrelationId | join kind=leftouter (WVDCheckpoints | summarize Checkpoints=make_list(pack(\'Time\', TimeGenerated, \'Name\', Name, \'Parameters\', Parameters, \'Source\', Source)) by CorrelationId | mv-apply Checkpoints on ( order by todatetime(Checkpoints[\'Time\']) asc | summarize Checkpoints=make_list(Checkpoints)) ) on CorrelationId | project-away CorrelationId1, CorrelationId2 | order by TimeGenerated desc | where TimeGenerated > ago(15m) | extend ResourceGroup=tostring(split(_ResourceId, \'/\')[4]) | extend HostPool=tostring(split(_ResourceId, \'/\')[8]) | where HostPool =~ \'xHostPoolNamex\' | extend ErrorShort=tostring(Errors[0].CodeSymbolic) | extend ErrorMessage=tostring(Errors[0].Message) | project TimeGenerated, HostPool, ResourceGroup, UserName, ClientOS, ClientVersion, ClientSideIPAddress, ConnectionType, ErrorShort, ErrorMessage'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = ''
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'HostPool'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'ResourceGroup'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'UserName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'ClientOS'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'ClientVersion'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'ClientSideIPAddress'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'ConnectionType'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'ErrorShort'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'ErrorMessage'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/UserDisconnectedover24hxHostPoolNamex_b31d7620-f79b-4a44-b4f6-e96563040ea4.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/UserDisconnectedover24hxHostPoolNamex_b31d7620-f79b-4a44-b4f6-e96563040ea4.bicep
new file mode 100644
index 000000000..5b47ff08b
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/UserDisconnectedover24hxHostPoolNamex_b31d7620-f79b-4a44-b4f6-e96563040ea4.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Verify Remote Desktop Policies are applied relating to Session Limits for xHostPoolNamex. This could impact your scaling plan as well.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'WVDConnections | where TimeGenerated > ago(24h) | where State == "Connected" | where _ResourceId contains "xHostPoolNamex" | project CorrelationId , UserName, ConnectionType, StartTime=TimeGenerated, SessionHostName | join (WVDConnections | where State == "Completed" | project EndTime=TimeGenerated, CorrelationId) on CorrelationId | project Duration = EndTime - StartTime, ConnectionType, UserName, SessionHostName | where Duration >= timespan(24:00:00) | sort by Duration desc'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'UserName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'SessionHostName'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DesktopVirtualization/hostPools/templates/bicep/UserDisconnectedover72hxHostPoolNamex_c2c03bd2-0b7c-43cb-9e83-9da78cc4eb6e.bicep b/services/DesktopVirtualization/hostPools/templates/bicep/UserDisconnectedover72hxHostPoolNamex_c2c03bd2-0b7c-43cb-9e83-9da78cc4eb6e.bicep
new file mode 100644
index 000000000..db3b6f521
--- /dev/null
+++ b/services/DesktopVirtualization/hostPools/templates/bicep/UserDisconnectedover72hxHostPoolNamex_c2c03bd2-0b7c-43cb-9e83-9da78cc4eb6e.bicep
@@ -0,0 +1,178 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Verify Remote Desktop Policies are applied relating to Session Limits for xHostPoolNamex. This could impact your scaling plan as well.'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = true
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = 'WVDConnections | where TimeGenerated > ago(24h) | where State == "Connected" | where _ResourceId contains "xHostPoolNamex" | project CorrelationId , UserName, ConnectionType, StartTime=TimeGenerated, SessionHostName | join (WVDConnections | where State == "Completed" | project EndTime=TimeGenerated, CorrelationId) on CorrelationId | project Duration = EndTime - StartTime, ConnectionType, UserName, SessionHostName | where Duration >= timespan(72:00:00) | sort by Duration desc'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = ''
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '_ResourceId'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 1
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [
+ {
+ name: 'UserName'
+ operator: 'Include'
+ values: ['*']
+ }
+ {
+ name: 'SessionHostName'
+ operator: 'Include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Devices/IotHubs/templates/arm/d2ctelemetryegressdropped_d5a028d1-ae0e-4349-8a79-630f891c8235.json b/services/Devices/IotHubs/templates/arm/d2ctelemetryegressdropped_d5a028d1-ae0e-4349-8a79-630f891c8235.json
new file mode 100644
index 000000000..dbeaf3a01
--- /dev/null
+++ b/services/Devices/IotHubs/templates/arm/d2ctelemetryegressdropped_d5a028d1-ae0e-4349-8a79-630f891c8235.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of times messages were dropped by IoT Hub routing due to dead endpoints. This value does not count messages delivered to fallback route as dropped messages are not delivered there.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "d2c.telemetry.egress.dropped",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Devices/IotHubs/templates/arm/d2ctelemetryingresssendThrottle_65deae31-85e8-477a-b17e-50d2d10cd7b0.json b/services/Devices/IotHubs/templates/arm/d2ctelemetryingresssendThrottle_65deae31-85e8-477a-b17e-50d2d10cd7b0.json
new file mode 100644
index 000000000..ca1aa0471
--- /dev/null
+++ b/services/Devices/IotHubs/templates/arm/d2ctelemetryingresssendThrottle_65deae31-85e8-477a-b17e-50d2d10cd7b0.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of throttling errors due to device throughput throttles",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "d2c.telemetry.ingress.sendThrottle",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Devices/IotHubs/templates/arm/dailyMessageQuotaUsed_d78fc655-68ca-4877-ac60-7fc805f1ae94.json b/services/Devices/IotHubs/templates/arm/dailyMessageQuotaUsed_d78fc655-68ca-4877-ac60-7fc805f1ae94.json
new file mode 100644
index 000000000..8db102757
--- /dev/null
+++ b/services/Devices/IotHubs/templates/arm/dailyMessageQuotaUsed_d78fc655-68ca-4877-ac60-7fc805f1ae94.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of total messages used today",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "360000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "dailyMessageQuotaUsed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Devices/IotHubs/templates/bicep/d2ctelemetryegressdropped_d5a028d1-ae0e-4349-8a79-630f891c8235.bicep b/services/Devices/IotHubs/templates/bicep/d2ctelemetryegressdropped_d5a028d1-ae0e-4349-8a79-630f891c8235.bicep
new file mode 100644
index 000000000..8441fcec5
--- /dev/null
+++ b/services/Devices/IotHubs/templates/bicep/d2ctelemetryegressdropped_d5a028d1-ae0e-4349-8a79-630f891c8235.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of times messages were dropped by IoT Hub routing due to dead endpoints. This value does not count messages delivered to fallback route as dropped messages are not delivered there.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'd2c.telemetry.egress.dropped'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Devices/IotHubs/templates/bicep/d2ctelemetryingresssendThrottle_65deae31-85e8-477a-b17e-50d2d10cd7b0.bicep b/services/Devices/IotHubs/templates/bicep/d2ctelemetryingresssendThrottle_65deae31-85e8-477a-b17e-50d2d10cd7b0.bicep
new file mode 100644
index 000000000..1535ba8bc
--- /dev/null
+++ b/services/Devices/IotHubs/templates/bicep/d2ctelemetryingresssendThrottle_65deae31-85e8-477a-b17e-50d2d10cd7b0.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of throttling errors due to device throughput throttles'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'd2c.telemetry.ingress.sendThrottle'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Devices/IotHubs/templates/bicep/dailyMessageQuotaUsed_d78fc655-68ca-4877-ac60-7fc805f1ae94.bicep b/services/Devices/IotHubs/templates/bicep/dailyMessageQuotaUsed_d78fc655-68ca-4877-ac60-7fc805f1ae94.bicep
new file mode 100644
index 000000000..4d75f05d6
--- /dev/null
+++ b/services/Devices/IotHubs/templates/bicep/dailyMessageQuotaUsed_d78fc655-68ca-4877-ac60-7fc805f1ae94.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of total messages used today'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 360000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'dailyMessageQuotaUsed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/DataUsage_0914c189-0adc-45d6-8704-d2ae73b9b7b6.json b/services/DocumentDB/databaseAccounts/templates/arm/DataUsage_0914c189-0adc-45d6-8704-d2ae73b9b7b6.json
new file mode 100644
index 000000000..3a69cc053
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/DataUsage_0914c189-0adc-45d6-8704-d2ae73b9b7b6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total data usage reported at 5 minutes granularity",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2147483648",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DataUsage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/MongoRequests_3f30e3aa-7e17-4eaf-a437-a420f5a23bf2.json b/services/DocumentDB/databaseAccounts/templates/arm/MongoRequests_3f30e3aa-7e17-4eaf-a437-a420f5a23bf2.json
new file mode 100644
index 000000000..0c8efdd4c
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/MongoRequests_3f30e3aa-7e17-4eaf-a437-a420f5a23bf2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of Mongo Requests Made",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "9",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "MongoRequests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/NormalizedRUConsumption_9bae539a-12ed-46e2-b105-101ce036c9a4.json b/services/DocumentDB/databaseAccounts/templates/arm/NormalizedRUConsumption_9bae539a-12ed-46e2-b105-101ce036c9a4.json
new file mode 100644
index 000000000..6e51260c1
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/NormalizedRUConsumption_9bae539a-12ed-46e2-b105-101ce036c9a4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Max RU consumption percentage per minute",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "70",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "NormalizedRUConsumption",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/OfflineRegion_0cb53be3-76b5-44be-9f32-bcc821be34b6.json b/services/DocumentDB/databaseAccounts/templates/arm/OfflineRegion_0cb53be3-76b5-44be-9f32-bcc821be34b6.json
new file mode 100644
index 000000000..c0ce89b8b
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/OfflineRegion_0cb53be3-76b5-44be-9f32-bcc821be34b6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Region Offlined",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OfflineRegion",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/ProvisionedThroughput_f77ce9c2-bb95-47e7-8e5d-75d5c098f489.json b/services/DocumentDB/databaseAccounts/templates/arm/ProvisionedThroughput_f77ce9c2-bb95-47e7-8e5d-75d5c098f489.json
new file mode 100644
index 000000000..3e3ed5b56
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/ProvisionedThroughput_f77ce9c2-bb95-47e7-8e5d-75d5c098f489.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Provisioned Throughput",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "3000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ProvisionedThroughput",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/RegionFailover_9c41c539-b81b-4917-b04a-e67225f78e75.json b/services/DocumentDB/databaseAccounts/templates/arm/RegionFailover_9c41c539-b81b-4917-b04a-e67225f78e75.json
new file mode 100644
index 000000000..195f55dfb
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/RegionFailover_9c41c539-b81b-4917-b04a-e67225f78e75.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Region Failed Over",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RegionFailover",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/RemoveRegion_228e104f-002a-441d-91ec-6140f233c1a4.json b/services/DocumentDB/databaseAccounts/templates/arm/RemoveRegion_228e104f-002a-441d-91ec-6140f233c1a4.json
new file mode 100644
index 000000000..b0cb177df
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/RemoveRegion_228e104f-002a-441d-91ec-6140f233c1a4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Region Removed",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RemoveRegion",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/ReplicationLatency_cf0655a4-042d-4979-bbc7-5559eaa8f2b9.json b/services/DocumentDB/databaseAccounts/templates/arm/ReplicationLatency_cf0655a4-042d-4979-bbc7-5559eaa8f2b9.json
new file mode 100644
index 000000000..8a7ccbbd1
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/ReplicationLatency_cf0655a4-042d-4979-bbc7-5559eaa8f2b9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "P99 Replication Latency across source and target regions for geo-enabled account",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ReplicationLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/ServerSideLatency_28f2e10d-2297-47f9-ac6a-c7a8cc0c8ead.json b/services/DocumentDB/databaseAccounts/templates/arm/ServerSideLatency_28f2e10d-2297-47f9-ac6a-c7a8cc0c8ead.json
new file mode 100644
index 000000000..caa05b997
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/ServerSideLatency_28f2e10d-2297-47f9-ac6a-c7a8cc0c8ead.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Server Side Latency",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ServerSideLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/ServiceAvailability_ee10b769-b38b-44d1-9fd3-926b8dca4c41.json b/services/DocumentDB/databaseAccounts/templates/arm/ServiceAvailability_ee10b769-b38b-44d1-9fd3-926b8dca4c41.json
new file mode 100644
index 000000000..eb5c66831
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/ServiceAvailability_ee10b769-b38b-44d1-9fd3-926b8dca4c41.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Account requests availability at one hour, day or month granularity",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ServiceAvailability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/SqlContainerDelete_faf5510e-28b7-42c9-8ad1-de68a5737eaf.json b/services/DocumentDB/databaseAccounts/templates/arm/SqlContainerDelete_faf5510e-28b7-42c9-8ad1-de68a5737eaf.json
new file mode 100644
index 000000000..694af88a5
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/SqlContainerDelete_faf5510e-28b7-42c9-8ad1-de68a5737eaf.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Sql Container Deleted",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SqlContainerDelete",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/SqlDatabaseDelete_a7958120-a386-46d0-9790-e80bfa72fb22.json b/services/DocumentDB/databaseAccounts/templates/arm/SqlDatabaseDelete_a7958120-a386-46d0-9790-e80bfa72fb22.json
new file mode 100644
index 000000000..e9deb1dfa
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/SqlDatabaseDelete_a7958120-a386-46d0-9790-e80bfa72fb22.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Sql Database Deleted",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SqlDatabaseDelete",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/TotalRequestUnits_14fc7c6b-484f-427f-a1d2-94cded799f88.json b/services/DocumentDB/databaseAccounts/templates/arm/TotalRequestUnits_14fc7c6b-484f-427f-a1d2-94cded799f88.json
new file mode 100644
index 000000000..f5eb06227
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/TotalRequestUnits_14fc7c6b-484f-427f-a1d2-94cded799f88.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "SQL Request Units consumed",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalRequestUnits",
+ "dimensions": [{"operator": "include", "name": "statuscode", "values": ["429"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/TotalRequests_2a1deb2d-1fc0-499b-a828-04aeece855fe.json b/services/DocumentDB/databaseAccounts/templates/arm/TotalRequests_2a1deb2d-1fc0-499b-a828-04aeece855fe.json
new file mode 100644
index 000000000..eba486e21
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/TotalRequests_2a1deb2d-1fc0-499b-a828-04aeece855fe.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of requests made",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalRequests",
+ "dimensions": [{"operator": "include", "name": "statuscode", "values": ["429"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/arm/UpdateAccountKeys_d4d7685a-ce55-4709-a847-747d02165cb7.json b/services/DocumentDB/databaseAccounts/templates/arm/UpdateAccountKeys_d4d7685a-ce55-4709-a847-747d02165cb7.json
new file mode 100644
index 000000000..6a88474c4
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/arm/UpdateAccountKeys_d4d7685a-ce55-4709-a847-747d02165cb7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Account Keys Updated",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UpdateAccountKeys",
+ "dimensions": [{"operator": "include", "name": "keytype", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/DataUsage_0914c189-0adc-45d6-8704-d2ae73b9b7b6.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/DataUsage_0914c189-0adc-45d6-8704-d2ae73b9b7b6.bicep
new file mode 100644
index 000000000..e6da6fef2
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/DataUsage_0914c189-0adc-45d6-8704-d2ae73b9b7b6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total data usage reported at 5 minutes granularity'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2147483648
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DataUsage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/MongoRequests_3f30e3aa-7e17-4eaf-a437-a420f5a23bf2.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/MongoRequests_3f30e3aa-7e17-4eaf-a437-a420f5a23bf2.bicep
new file mode 100644
index 000000000..55a2d5a50
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/MongoRequests_3f30e3aa-7e17-4eaf-a437-a420f5a23bf2.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of Mongo Requests Made'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 9
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'MongoRequests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/NormalizedRUConsumption_9bae539a-12ed-46e2-b105-101ce036c9a4.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/NormalizedRUConsumption_9bae539a-12ed-46e2-b105-101ce036c9a4.bicep
new file mode 100644
index 000000000..0785257a2
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/NormalizedRUConsumption_9bae539a-12ed-46e2-b105-101ce036c9a4.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Max RU consumption percentage per minute'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 70
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'NormalizedRUConsumption'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/OfflineRegion_0cb53be3-76b5-44be-9f32-bcc821be34b6.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/OfflineRegion_0cb53be3-76b5-44be-9f32-bcc821be34b6.bicep
new file mode 100644
index 000000000..a57c3a21f
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/OfflineRegion_0cb53be3-76b5-44be-9f32-bcc821be34b6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Region Offlined'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OfflineRegion'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/ProvisionedThroughput_f77ce9c2-bb95-47e7-8e5d-75d5c098f489.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/ProvisionedThroughput_f77ce9c2-bb95-47e7-8e5d-75d5c098f489.bicep
new file mode 100644
index 000000000..5e60c2240
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/ProvisionedThroughput_f77ce9c2-bb95-47e7-8e5d-75d5c098f489.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Provisioned Throughput'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 3000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ProvisionedThroughput'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/RegionFailover_9c41c539-b81b-4917-b04a-e67225f78e75.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/RegionFailover_9c41c539-b81b-4917-b04a-e67225f78e75.bicep
new file mode 100644
index 000000000..3cd356b40
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/RegionFailover_9c41c539-b81b-4917-b04a-e67225f78e75.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Region Failed Over'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RegionFailover'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/RemoveRegion_228e104f-002a-441d-91ec-6140f233c1a4.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/RemoveRegion_228e104f-002a-441d-91ec-6140f233c1a4.bicep
new file mode 100644
index 000000000..2746c1647
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/RemoveRegion_228e104f-002a-441d-91ec-6140f233c1a4.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Region Removed'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RemoveRegion'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/ReplicationLatency_cf0655a4-042d-4979-bbc7-5559eaa8f2b9.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/ReplicationLatency_cf0655a4-042d-4979-bbc7-5559eaa8f2b9.bicep
new file mode 100644
index 000000000..798640fde
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/ReplicationLatency_cf0655a4-042d-4979-bbc7-5559eaa8f2b9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'P99 Replication Latency across source and target regions for geo-enabled account'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ReplicationLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/ServerSideLatency_28f2e10d-2297-47f9-ac6a-c7a8cc0c8ead.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/ServerSideLatency_28f2e10d-2297-47f9-ac6a-c7a8cc0c8ead.bicep
new file mode 100644
index 000000000..419a9d1c3
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/ServerSideLatency_28f2e10d-2297-47f9-ac6a-c7a8cc0c8ead.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Server Side Latency'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ServerSideLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/ServiceAvailability_ee10b769-b38b-44d1-9fd3-926b8dca4c41.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/ServiceAvailability_ee10b769-b38b-44d1-9fd3-926b8dca4c41.bicep
new file mode 100644
index 000000000..a316b8450
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/ServiceAvailability_ee10b769-b38b-44d1-9fd3-926b8dca4c41.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Account requests availability at one hour, day or month granularity'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ServiceAvailability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/SqlContainerDelete_faf5510e-28b7-42c9-8ad1-de68a5737eaf.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/SqlContainerDelete_faf5510e-28b7-42c9-8ad1-de68a5737eaf.bicep
new file mode 100644
index 000000000..a7ffe3494
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/SqlContainerDelete_faf5510e-28b7-42c9-8ad1-de68a5737eaf.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Sql Container Deleted'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SqlContainerDelete'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/SqlDatabaseDelete_a7958120-a386-46d0-9790-e80bfa72fb22.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/SqlDatabaseDelete_a7958120-a386-46d0-9790-e80bfa72fb22.bicep
new file mode 100644
index 000000000..304e17b69
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/SqlDatabaseDelete_a7958120-a386-46d0-9790-e80bfa72fb22.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Sql Database Deleted'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SqlDatabaseDelete'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/TotalRequestUnits_14fc7c6b-484f-427f-a1d2-94cded799f88.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/TotalRequestUnits_14fc7c6b-484f-427f-a1d2-94cded799f88.bicep
new file mode 100644
index 000000000..2e33727c4
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/TotalRequestUnits_14fc7c6b-484f-427f-a1d2-94cded799f88.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'SQL Request Units consumed'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalRequestUnits'
+ dimensions: [
+ {
+ name: 'statuscode'
+ operator: 'include'
+ values: ['429']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/TotalRequests_2a1deb2d-1fc0-499b-a828-04aeece855fe.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/TotalRequests_2a1deb2d-1fc0-499b-a828-04aeece855fe.bicep
new file mode 100644
index 000000000..e16ea79d6
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/TotalRequests_2a1deb2d-1fc0-499b-a828-04aeece855fe.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of requests made'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalRequests'
+ dimensions: [
+ {
+ name: 'statuscode'
+ operator: 'include'
+ values: ['429']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/DocumentDB/databaseAccounts/templates/bicep/UpdateAccountKeys_d4d7685a-ce55-4709-a847-747d02165cb7.bicep b/services/DocumentDB/databaseAccounts/templates/bicep/UpdateAccountKeys_d4d7685a-ce55-4709-a847-747d02165cb7.bicep
new file mode 100644
index 000000000..b9e06811c
--- /dev/null
+++ b/services/DocumentDB/databaseAccounts/templates/bicep/UpdateAccountKeys_d4d7685a-ce55-4709-a847-747d02165cb7.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Account Keys Updated'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UpdateAccountKeys'
+ dimensions: [
+ {
+ name: 'keytype'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventGrid/systemTopics/templates/arm/DeadLetteredCount_c02f2d18-2b7e-4d85-81fa-2c1437d0b092.json b/services/EventGrid/systemTopics/templates/arm/DeadLetteredCount_c02f2d18-2b7e-4d85-81fa-2c1437d0b092.json
new file mode 100644
index 000000000..4fa37e1db
--- /dev/null
+++ b/services/EventGrid/systemTopics/templates/arm/DeadLetteredCount_c02f2d18-2b7e-4d85-81fa-2c1437d0b092.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total dead lettered events matching to this event subscription",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DeadLetteredCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventGrid/systemTopics/templates/arm/DeliveryAttemptFailCount_6584a39d-0795-4132-8c33-376d3926d21b.json b/services/EventGrid/systemTopics/templates/arm/DeliveryAttemptFailCount_6584a39d-0795-4132-8c33-376d3926d21b.json
new file mode 100644
index 000000000..81be23660
--- /dev/null
+++ b/services/EventGrid/systemTopics/templates/arm/DeliveryAttemptFailCount_6584a39d-0795-4132-8c33-376d3926d21b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total events failed to deliver to this event subscription",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DeliveryAttemptFailCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventGrid/systemTopics/templates/arm/PublishFailCount_fb8bc2ae-26bc-45a1-b616-1f45ffb864ae.json b/services/EventGrid/systemTopics/templates/arm/PublishFailCount_fb8bc2ae-26bc-45a1-b616-1f45ffb864ae.json
new file mode 100644
index 000000000..c60ec374a
--- /dev/null
+++ b/services/EventGrid/systemTopics/templates/arm/PublishFailCount_fb8bc2ae-26bc-45a1-b616-1f45ffb864ae.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total events failed to publish to this topic",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PublishFailCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventGrid/systemTopics/templates/bicep/DeadLetteredCount_c02f2d18-2b7e-4d85-81fa-2c1437d0b092.bicep b/services/EventGrid/systemTopics/templates/bicep/DeadLetteredCount_c02f2d18-2b7e-4d85-81fa-2c1437d0b092.bicep
new file mode 100644
index 000000000..4a2200a09
--- /dev/null
+++ b/services/EventGrid/systemTopics/templates/bicep/DeadLetteredCount_c02f2d18-2b7e-4d85-81fa-2c1437d0b092.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total dead lettered events matching to this event subscription'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DeadLetteredCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventGrid/systemTopics/templates/bicep/DeliveryAttemptFailCount_6584a39d-0795-4132-8c33-376d3926d21b.bicep b/services/EventGrid/systemTopics/templates/bicep/DeliveryAttemptFailCount_6584a39d-0795-4132-8c33-376d3926d21b.bicep
new file mode 100644
index 000000000..c2ab4157a
--- /dev/null
+++ b/services/EventGrid/systemTopics/templates/bicep/DeliveryAttemptFailCount_6584a39d-0795-4132-8c33-376d3926d21b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total events failed to deliver to this event subscription'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DeliveryAttemptFailCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventGrid/systemTopics/templates/bicep/PublishFailCount_fb8bc2ae-26bc-45a1-b616-1f45ffb864ae.bicep b/services/EventGrid/systemTopics/templates/bicep/PublishFailCount_fb8bc2ae-26bc-45a1-b616-1f45ffb864ae.bicep
new file mode 100644
index 000000000..feb8ad5d4
--- /dev/null
+++ b/services/EventGrid/systemTopics/templates/bicep/PublishFailCount_fb8bc2ae-26bc-45a1-b616-1f45ffb864ae.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total events failed to publish to this topic'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PublishFailCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventGrid/topics/templates/arm/DeadLetteredCount_343258f9-4bb2-41fb-abfa-d04ea62a6aad.json b/services/EventGrid/topics/templates/arm/DeadLetteredCount_343258f9-4bb2-41fb-abfa-d04ea62a6aad.json
new file mode 100644
index 000000000..4fa37e1db
--- /dev/null
+++ b/services/EventGrid/topics/templates/arm/DeadLetteredCount_343258f9-4bb2-41fb-abfa-d04ea62a6aad.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total dead lettered events matching to this event subscription",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DeadLetteredCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventGrid/topics/templates/arm/DeliveryAttemptFailCount_95865d3b-41d0-4ad6-b08b-a2dcfe0940a9.json b/services/EventGrid/topics/templates/arm/DeliveryAttemptFailCount_95865d3b-41d0-4ad6-b08b-a2dcfe0940a9.json
new file mode 100644
index 000000000..5f767c352
--- /dev/null
+++ b/services/EventGrid/topics/templates/arm/DeliveryAttemptFailCount_95865d3b-41d0-4ad6-b08b-a2dcfe0940a9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total events failed to deliver to this event subscription",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DeliveryAttemptFailCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventGrid/topics/templates/arm/DroppedEventCount_e9561f89-282e-4145-b5cc-8485a7fc987c.json b/services/EventGrid/topics/templates/arm/DroppedEventCount_e9561f89-282e-4145-b5cc-8485a7fc987c.json
new file mode 100644
index 000000000..bd7b86e1c
--- /dev/null
+++ b/services/EventGrid/topics/templates/arm/DroppedEventCount_e9561f89-282e-4145-b5cc-8485a7fc987c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total dropped events matching to this event subscription",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DroppedEventCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventGrid/topics/templates/arm/PublishFailCount_230c0173-8b36-4412-9617-3e096886a403.json b/services/EventGrid/topics/templates/arm/PublishFailCount_230c0173-8b36-4412-9617-3e096886a403.json
new file mode 100644
index 000000000..a13044971
--- /dev/null
+++ b/services/EventGrid/topics/templates/arm/PublishFailCount_230c0173-8b36-4412-9617-3e096886a403.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total events failed to publish to this topic",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PublishFailCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventGrid/topics/templates/bicep/DeadLetteredCount_343258f9-4bb2-41fb-abfa-d04ea62a6aad.bicep b/services/EventGrid/topics/templates/bicep/DeadLetteredCount_343258f9-4bb2-41fb-abfa-d04ea62a6aad.bicep
new file mode 100644
index 000000000..4a2200a09
--- /dev/null
+++ b/services/EventGrid/topics/templates/bicep/DeadLetteredCount_343258f9-4bb2-41fb-abfa-d04ea62a6aad.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total dead lettered events matching to this event subscription'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DeadLetteredCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventGrid/topics/templates/bicep/DeliveryAttemptFailCount_95865d3b-41d0-4ad6-b08b-a2dcfe0940a9.bicep b/services/EventGrid/topics/templates/bicep/DeliveryAttemptFailCount_95865d3b-41d0-4ad6-b08b-a2dcfe0940a9.bicep
new file mode 100644
index 000000000..9e373f7fc
--- /dev/null
+++ b/services/EventGrid/topics/templates/bicep/DeliveryAttemptFailCount_95865d3b-41d0-4ad6-b08b-a2dcfe0940a9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total events failed to deliver to this event subscription'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DeliveryAttemptFailCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventGrid/topics/templates/bicep/DroppedEventCount_e9561f89-282e-4145-b5cc-8485a7fc987c.bicep b/services/EventGrid/topics/templates/bicep/DroppedEventCount_e9561f89-282e-4145-b5cc-8485a7fc987c.bicep
new file mode 100644
index 000000000..c7260fedc
--- /dev/null
+++ b/services/EventGrid/topics/templates/bicep/DroppedEventCount_e9561f89-282e-4145-b5cc-8485a7fc987c.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total dropped events matching to this event subscription'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DroppedEventCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventGrid/topics/templates/bicep/PublishFailCount_230c0173-8b36-4412-9617-3e096886a403.bicep b/services/EventGrid/topics/templates/bicep/PublishFailCount_230c0173-8b36-4412-9617-3e096886a403.bicep
new file mode 100644
index 000000000..f6e1866b0
--- /dev/null
+++ b/services/EventGrid/topics/templates/bicep/PublishFailCount_230c0173-8b36-4412-9617-3e096886a403.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total events failed to publish to this topic'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PublishFailCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/clusters/templates/arm/CPU_8875590a-9f72-49a2-807f-62437f8079b1.json b/services/EventHub/clusters/templates/arm/CPU_8875590a-9f72-49a2-807f-62437f8079b1.json
new file mode 100644
index 000000000..128fd1a40
--- /dev/null
+++ b/services/EventHub/clusters/templates/arm/CPU_8875590a-9f72-49a2-807f-62437f8079b1.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU utilization for the Event Hub Cluster as a percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "70",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CPU",
+ "dimensions": [{"name": "role", "operator": "include", "values": ["sbsfe"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/clusters/templates/bicep/CPU_8875590a-9f72-49a2-807f-62437f8079b1.bicep b/services/EventHub/clusters/templates/bicep/CPU_8875590a-9f72-49a2-807f-62437f8079b1.bicep
new file mode 100644
index 000000000..e2ec9d2ad
--- /dev/null
+++ b/services/EventHub/clusters/templates/bicep/CPU_8875590a-9f72-49a2-807f-62437f8079b1.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU utilization for the Event Hub Cluster as a percentage'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 70
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CPU'
+ dimensions: [
+ {
+ name: 'role'
+ operator: 'include'
+ values: ['sbsfe']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/arm/CaptureBacklog_2959b52d-6756-480d-9193-b2c0c4c5d305.json b/services/EventHub/namespaces/templates/arm/CaptureBacklog_2959b52d-6756-480d-9193-b2c0c4c5d305.json
new file mode 100644
index 000000000..80485fba2
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/CaptureBacklog_2959b52d-6756-480d-9193-b2c0c4c5d305.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Capture Backlog for Microsoft.EventHub.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "50000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT6H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CaptureBacklog",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/arm/IncomingBytes_2ca39ff3-6f87-438c-81f6-7ce51f70902f.json b/services/EventHub/namespaces/templates/arm/IncomingBytes_2ca39ff3-6f87-438c-81f6-7ce51f70902f.json
new file mode 100644
index 000000000..7a567d43c
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/IncomingBytes_2ca39ff3-6f87-438c-81f6-7ce51f70902f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Incoming Bytes for Microsoft.EventHub.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "400000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IncomingBytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/arm/IncomingMessages_4f1964ce-6938-499a-af3d-bb746aaff72a.json b/services/EventHub/namespaces/templates/arm/IncomingMessages_4f1964ce-6938-499a-af3d-bb746aaff72a.json
new file mode 100644
index 000000000..637b28725
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/IncomingMessages_4f1964ce-6938-499a-af3d-bb746aaff72a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Incoming Messages for Microsoft.EventHub.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT6H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IncomingMessages",
+ "dimensions": [{"operator": "include", "name": "entityname", "values": ["application-logs"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/arm/NamespaceCpuUsage_a9c1e74c-bd3a-438c-bd13-7a2fec2d172c.json b/services/EventHub/namespaces/templates/arm/NamespaceCpuUsage_a9c1e74c-bd3a-438c-bd13-7a2fec2d172c.json
new file mode 100644
index 000000000..85b2de55c
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/NamespaceCpuUsage_a9c1e74c-bd3a-438c-bd13-7a2fec2d172c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU usage metric for Premium SKU namespaces.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "NamespaceCpuUsage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/arm/NamespaceMemoryUsage_26972609-fbb4-4fb9-b7f8-7b99a06bb4e3.json b/services/EventHub/namespaces/templates/arm/NamespaceMemoryUsage_26972609-fbb4-4fb9-b7f8-7b99a06bb4e3.json
new file mode 100644
index 000000000..dae1ab040
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/NamespaceMemoryUsage_26972609-fbb4-4fb9-b7f8-7b99a06bb4e3.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory usage metric for Premium SKU namespaces.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "NamespaceMemoryUsage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/arm/OutgoingBytes_46a66177-c487-4ed1-b2fc-19c0bf52b168.json b/services/EventHub/namespaces/templates/arm/OutgoingBytes_46a66177-c487-4ed1-b2fc-19c0bf52b168.json
new file mode 100644
index 000000000..f65e696a9
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/OutgoingBytes_46a66177-c487-4ed1-b2fc-19c0bf52b168.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Outgoing Bytes for Microsoft.EventHub.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "400000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OutgoingBytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/arm/OutgoingMessages_c67b86dc-74d5-4ea1-882e-de257d054ff3.json b/services/EventHub/namespaces/templates/arm/OutgoingMessages_c67b86dc-74d5-4ea1-882e-de257d054ff3.json
new file mode 100644
index 000000000..1f60b2115
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/OutgoingMessages_c67b86dc-74d5-4ea1-882e-de257d054ff3.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Outgoing Messages for Microsoft.EventHub.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT6H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OutgoingMessages",
+ "dimensions": [{"operator": "include", "name": "entityname", "values": ["application-logs"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/arm/QuotaExceededErrors_237493ef-15c0-4e87-80bc-f8c59dd897ce.json b/services/EventHub/namespaces/templates/arm/QuotaExceededErrors_237493ef-15c0-4e87-80bc-f8c59dd897ce.json
new file mode 100644
index 000000000..4596ee046
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/QuotaExceededErrors_237493ef-15c0-4e87-80bc-f8c59dd897ce.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Quota Exceeded Errors for Microsoft.EventHub.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "QuotaExceededErrors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/arm/ServerErrors_48581aa9-53ee-4467-b04c-402061fe40e8.json b/services/EventHub/namespaces/templates/arm/ServerErrors_48581aa9-53ee-4467-b04c-402061fe40e8.json
new file mode 100644
index 000000000..7c8b9d1ca
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/ServerErrors_48581aa9-53ee-4467-b04c-402061fe40e8.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Server Errors for Microsoft.EventHub.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ServerErrors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/arm/ThrottledRequests_1684f387-04e6-440c-a931-f57efdc84cd2.json b/services/EventHub/namespaces/templates/arm/ThrottledRequests_1684f387-04e6-440c-a931-f57efdc84cd2.json
new file mode 100644
index 000000000..548380c3f
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/ThrottledRequests_1684f387-04e6-440c-a931-f57efdc84cd2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Throttled Requests for Microsoft.EventHub.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ThrottledRequests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/arm/UserErrors_b1700765-b168-4ad4-a73e-f3a93a6bf5cf.json b/services/EventHub/namespaces/templates/arm/UserErrors_b1700765-b168-4ad4-a73e-f3a93a6bf5cf.json
new file mode 100644
index 000000000..97f7aa0f7
--- /dev/null
+++ b/services/EventHub/namespaces/templates/arm/UserErrors_b1700765-b168-4ad4-a73e-f3a93a6bf5cf.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "User Errors for Microsoft.EventHub.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UserErrors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/EventHub/namespaces/templates/bicep/CaptureBacklog_2959b52d-6756-480d-9193-b2c0c4c5d305.bicep b/services/EventHub/namespaces/templates/bicep/CaptureBacklog_2959b52d-6756-480d-9193-b2c0c4c5d305.bicep
new file mode 100644
index 000000000..d65568315
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/CaptureBacklog_2959b52d-6756-480d-9193-b2c0c4c5d305.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Capture Backlog for Microsoft.EventHub.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 50000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT6H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CaptureBacklog'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/bicep/IncomingBytes_2ca39ff3-6f87-438c-81f6-7ce51f70902f.bicep b/services/EventHub/namespaces/templates/bicep/IncomingBytes_2ca39ff3-6f87-438c-81f6-7ce51f70902f.bicep
new file mode 100644
index 000000000..4058bdea9
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/IncomingBytes_2ca39ff3-6f87-438c-81f6-7ce51f70902f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Incoming Bytes for Microsoft.EventHub.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 400000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IncomingBytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/bicep/IncomingMessages_4f1964ce-6938-499a-af3d-bb746aaff72a.bicep b/services/EventHub/namespaces/templates/bicep/IncomingMessages_4f1964ce-6938-499a-af3d-bb746aaff72a.bicep
new file mode 100644
index 000000000..dd3fb5b9a
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/IncomingMessages_4f1964ce-6938-499a-af3d-bb746aaff72a.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Incoming Messages for Microsoft.EventHub.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT6H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IncomingMessages'
+ dimensions: [
+ {
+ name: 'entityname'
+ operator: 'include'
+ values: ['application-logs']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/bicep/NamespaceCpuUsage_a9c1e74c-bd3a-438c-bd13-7a2fec2d172c.bicep b/services/EventHub/namespaces/templates/bicep/NamespaceCpuUsage_a9c1e74c-bd3a-438c-bd13-7a2fec2d172c.bicep
new file mode 100644
index 000000000..89f33b14b
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/NamespaceCpuUsage_a9c1e74c-bd3a-438c-bd13-7a2fec2d172c.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU usage metric for Premium SKU namespaces.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'NamespaceCpuUsage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/bicep/NamespaceMemoryUsage_26972609-fbb4-4fb9-b7f8-7b99a06bb4e3.bicep b/services/EventHub/namespaces/templates/bicep/NamespaceMemoryUsage_26972609-fbb4-4fb9-b7f8-7b99a06bb4e3.bicep
new file mode 100644
index 000000000..030f3b67e
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/NamespaceMemoryUsage_26972609-fbb4-4fb9-b7f8-7b99a06bb4e3.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory usage metric for Premium SKU namespaces.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'NamespaceMemoryUsage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/bicep/OutgoingBytes_46a66177-c487-4ed1-b2fc-19c0bf52b168.bicep b/services/EventHub/namespaces/templates/bicep/OutgoingBytes_46a66177-c487-4ed1-b2fc-19c0bf52b168.bicep
new file mode 100644
index 000000000..740800b93
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/OutgoingBytes_46a66177-c487-4ed1-b2fc-19c0bf52b168.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Outgoing Bytes for Microsoft.EventHub.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 400000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OutgoingBytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/bicep/OutgoingMessages_c67b86dc-74d5-4ea1-882e-de257d054ff3.bicep b/services/EventHub/namespaces/templates/bicep/OutgoingMessages_c67b86dc-74d5-4ea1-882e-de257d054ff3.bicep
new file mode 100644
index 000000000..6339d1d62
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/OutgoingMessages_c67b86dc-74d5-4ea1-882e-de257d054ff3.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Outgoing Messages for Microsoft.EventHub.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT6H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OutgoingMessages'
+ dimensions: [
+ {
+ name: 'entityname'
+ operator: 'include'
+ values: ['application-logs']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/bicep/QuotaExceededErrors_237493ef-15c0-4e87-80bc-f8c59dd897ce.bicep b/services/EventHub/namespaces/templates/bicep/QuotaExceededErrors_237493ef-15c0-4e87-80bc-f8c59dd897ce.bicep
new file mode 100644
index 000000000..55c6bbf3d
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/QuotaExceededErrors_237493ef-15c0-4e87-80bc-f8c59dd897ce.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Quota Exceeded Errors for Microsoft.EventHub.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'QuotaExceededErrors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/bicep/ServerErrors_48581aa9-53ee-4467-b04c-402061fe40e8.bicep b/services/EventHub/namespaces/templates/bicep/ServerErrors_48581aa9-53ee-4467-b04c-402061fe40e8.bicep
new file mode 100644
index 000000000..e4387ebed
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/ServerErrors_48581aa9-53ee-4467-b04c-402061fe40e8.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Server Errors for Microsoft.EventHub.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ServerErrors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/bicep/ThrottledRequests_1684f387-04e6-440c-a931-f57efdc84cd2.bicep b/services/EventHub/namespaces/templates/bicep/ThrottledRequests_1684f387-04e6-440c-a931-f57efdc84cd2.bicep
new file mode 100644
index 000000000..8ff541744
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/ThrottledRequests_1684f387-04e6-440c-a931-f57efdc84cd2.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Throttled Requests for Microsoft.EventHub.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ThrottledRequests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/EventHub/namespaces/templates/bicep/UserErrors_b1700765-b168-4ad4-a73e-f3a93a6bf5cf.bicep b/services/EventHub/namespaces/templates/bicep/UserErrors_b1700765-b168-4ad4-a73e-f3a93a6bf5cf.bicep
new file mode 100644
index 000000000..3d23996ef
--- /dev/null
+++ b/services/EventHub/namespaces/templates/bicep/UserErrors_b1700765-b168-4ad4-a73e-f3a93a6bf5cf.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'User Errors for Microsoft.EventHub.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UserErrors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/KeyVault/vaults/templates/arm/ActivityLogKeyVaultDelete_f68ed392-7179-419d-8ee6-3813ea10866b.json b/services/KeyVault/vaults/templates/arm/ActivityLogKeyVaultDelete_f68ed392-7179-419d-8ee6-3813ea10866b.json
new file mode 100644
index 000000000..ffc6ed874
--- /dev/null
+++ b/services/KeyVault/vaults/templates/arm/ActivityLogKeyVaultDelete_f68ed392-7179-419d-8ee6-3813ea10866b.json
@@ -0,0 +1,95 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Activity Log Alert for Key Vault Delete",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "Administrative"
+ },
+ {
+ "field": "operationName",
+ "equals": "Microsoft.KeyVault/vaults/delete"
+ },
+ {
+ "field": "status",
+ "containsAny": ["succeeded"]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/KeyVault/vaults/templates/arm/Availability_a3c8bcb4-22ca-45be-92f7-605f232ecec2.json b/services/KeyVault/vaults/templates/arm/Availability_a3c8bcb4-22ca-45be-92f7-605f232ecec2.json
new file mode 100644
index 000000000..61f081e29
--- /dev/null
+++ b/services/KeyVault/vaults/templates/arm/Availability_a3c8bcb4-22ca-45be-92f7-605f232ecec2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Vault requests availability",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Availability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/KeyVault/vaults/templates/arm/SaturationShoebox_dc852755-e5df-4fd0-83ac-cbbc516f60b3.json b/services/KeyVault/vaults/templates/arm/SaturationShoebox_dc852755-e5df-4fd0-83ac-cbbc516f60b3.json
new file mode 100644
index 000000000..f4520ec39
--- /dev/null
+++ b/services/KeyVault/vaults/templates/arm/SaturationShoebox_dc852755-e5df-4fd0-83ac-cbbc516f60b3.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Vault capacity used",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "75",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SaturationShoebox",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/KeyVault/vaults/templates/arm/ServiceApiHit_7b52bf07-3d86-4429-b5d4-829a6a5542df.json b/services/KeyVault/vaults/templates/arm/ServiceApiHit_7b52bf07-3d86-4429-b5d4-829a6a5542df.json
new file mode 100644
index 000000000..a80b20e4f
--- /dev/null
+++ b/services/KeyVault/vaults/templates/arm/ServiceApiHit_7b52bf07-3d86-4429-b5d4-829a6a5542df.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of total service api hits",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ServiceApiHit",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/KeyVault/vaults/templates/arm/ServiceApiLatency_2651f57f-ac74-44f3-8511-c245488134f8.json b/services/KeyVault/vaults/templates/arm/ServiceApiLatency_2651f57f-ac74-44f3-8511-c245488134f8.json
new file mode 100644
index 000000000..50eddcd50
--- /dev/null
+++ b/services/KeyVault/vaults/templates/arm/ServiceApiLatency_2651f57f-ac74-44f3-8511-c245488134f8.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Overall latency of service api requests",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ServiceApiLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/KeyVault/vaults/templates/arm/ServiceApiResult_14356b19-1264-498d-b1cd-e3fa9f0c9fc9.json b/services/KeyVault/vaults/templates/arm/ServiceApiResult_14356b19-1264-498d-b1cd-e3fa9f0c9fc9.json
new file mode 100644
index 000000000..15a713674
--- /dev/null
+++ b/services/KeyVault/vaults/templates/arm/ServiceApiResult_14356b19-1264-498d-b1cd-e3fa9f0c9fc9.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of total service api results",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "ServiceApiResult",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/KeyVault/vaults/templates/bicep/ActivityLogKeyVaultDelete_f68ed392-7179-419d-8ee6-3813ea10866b.bicep b/services/KeyVault/vaults/templates/bicep/ActivityLogKeyVaultDelete_f68ed392-7179-419d-8ee6-3813ea10866b.bicep
new file mode 100644
index 000000000..bf13ccb28
--- /dev/null
+++ b/services/KeyVault/vaults/templates/bicep/ActivityLogKeyVaultDelete_f68ed392-7179-419d-8ee6-3813ea10866b.bicep
@@ -0,0 +1,68 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Activity Log Alert for Key Vault Delete'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'Administrative'
+ }
+ {
+ field: 'operationName'
+ equals: 'Microsoft.KeyVault/vaults/delete'
+ }
+ {
+ field: 'status'
+ containsAny: ['succeeded']
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/KeyVault/vaults/templates/bicep/Availability_a3c8bcb4-22ca-45be-92f7-605f232ecec2.bicep b/services/KeyVault/vaults/templates/bicep/Availability_a3c8bcb4-22ca-45be-92f7-605f232ecec2.bicep
new file mode 100644
index 000000000..b38fb8ede
--- /dev/null
+++ b/services/KeyVault/vaults/templates/bicep/Availability_a3c8bcb4-22ca-45be-92f7-605f232ecec2.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Vault requests availability'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Availability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/KeyVault/vaults/templates/bicep/SaturationShoebox_dc852755-e5df-4fd0-83ac-cbbc516f60b3.bicep b/services/KeyVault/vaults/templates/bicep/SaturationShoebox_dc852755-e5df-4fd0-83ac-cbbc516f60b3.bicep
new file mode 100644
index 000000000..d988bcde4
--- /dev/null
+++ b/services/KeyVault/vaults/templates/bicep/SaturationShoebox_dc852755-e5df-4fd0-83ac-cbbc516f60b3.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Vault capacity used'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 75
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SaturationShoebox'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/KeyVault/vaults/templates/bicep/ServiceApiHit_7b52bf07-3d86-4429-b5d4-829a6a5542df.bicep b/services/KeyVault/vaults/templates/bicep/ServiceApiHit_7b52bf07-3d86-4429-b5d4-829a6a5542df.bicep
new file mode 100644
index 000000000..21bb50593
--- /dev/null
+++ b/services/KeyVault/vaults/templates/bicep/ServiceApiHit_7b52bf07-3d86-4429-b5d4-829a6a5542df.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of total service api hits'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ServiceApiHit'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/KeyVault/vaults/templates/bicep/ServiceApiLatency_2651f57f-ac74-44f3-8511-c245488134f8.bicep b/services/KeyVault/vaults/templates/bicep/ServiceApiLatency_2651f57f-ac74-44f3-8511-c245488134f8.bicep
new file mode 100644
index 000000000..a47bbb76c
--- /dev/null
+++ b/services/KeyVault/vaults/templates/bicep/ServiceApiLatency_2651f57f-ac74-44f3-8511-c245488134f8.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Overall latency of service api requests'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ServiceApiLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/KeyVault/vaults/templates/bicep/ServiceApiResult_14356b19-1264-498d-b1cd-e3fa9f0c9fc9.bicep b/services/KeyVault/vaults/templates/bicep/ServiceApiResult_14356b19-1264-498d-b1cd-e3fa9f0c9fc9.bicep
new file mode 100644
index 000000000..c1fa0b7c2
--- /dev/null
+++ b/services/KeyVault/vaults/templates/bicep/ServiceApiResult_14356b19-1264-498d-b1cd-e3fa9f0c9fc9.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of total service api results'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'ServiceApiResult'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Kusto/clusters/templates/arm/BlobsDropped_422c292e-54e3-4e7d-93e2-bcd1bf65dae6.json b/services/Kusto/clusters/templates/arm/BlobsDropped_422c292e-54e3-4e7d-93e2-bcd1bf65dae6.json
new file mode 100644
index 000000000..87b6ed689
--- /dev/null
+++ b/services/Kusto/clusters/templates/arm/BlobsDropped_422c292e-54e3-4e7d-93e2-bcd1bf65dae6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of blobs permanently rejected by a component.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BlobsDropped",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Kusto/clusters/templates/arm/CPU_cae6ec0a-a26d-494b-94b2-3d93dcedff42.json b/services/Kusto/clusters/templates/arm/CPU_cae6ec0a-a26d-494b-94b2-3d93dcedff42.json
new file mode 100644
index 000000000..91bb79f1d
--- /dev/null
+++ b/services/Kusto/clusters/templates/arm/CPU_cae6ec0a-a26d-494b-94b2-3d93dcedff42.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU utilization level",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "70",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CPU",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Kusto/clusters/templates/arm/IngestionLatencyInSeconds_8493c362-2524-4079-9025-8f5ffee62936.json b/services/Kusto/clusters/templates/arm/IngestionLatencyInSeconds_8493c362-2524-4079-9025-8f5ffee62936.json
new file mode 100644
index 000000000..65616a5d9
--- /dev/null
+++ b/services/Kusto/clusters/templates/arm/IngestionLatencyInSeconds_8493c362-2524-4079-9025-8f5ffee62936.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Latency of data ingested, from the time the data was received in the cluster until it's ready for query. The ingestion latency period depends on the ingestion scenario.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1800",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Minimum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT6H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IngestionLatencyInSeconds",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Kusto/clusters/templates/arm/IngestionResult_6c4213c5-743f-48b8-b957-dd26fbf8809e.json b/services/Kusto/clusters/templates/arm/IngestionResult_6c4213c5-743f-48b8-b957-dd26fbf8809e.json
new file mode 100644
index 000000000..1b1eb18fc
--- /dev/null
+++ b/services/Kusto/clusters/templates/arm/IngestionResult_6c4213c5-743f-48b8-b957-dd26fbf8809e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of sources that either failed or succeeded to be ingested. Splitting the metric by status, you can get detailed information about the status of the ingestion operations.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "300",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IngestionResult",
+ "dimensions": [{"operator": "include", "name": "failurekind", "values": ["permanent"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Kusto/clusters/templates/arm/KeepAlive_188fc0b5-a686-48a7-950f-76f183ba49d6.json b/services/Kusto/clusters/templates/arm/KeepAlive_188fc0b5-a686-48a7-950f-76f183ba49d6.json
new file mode 100644
index 000000000..74aa60e2f
--- /dev/null
+++ b/services/Kusto/clusters/templates/arm/KeepAlive_188fc0b5-a686-48a7-950f-76f183ba49d6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Sanity check indicates the cluster responds to queries",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "KeepAlive",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Kusto/clusters/templates/bicep/BlobsDropped_422c292e-54e3-4e7d-93e2-bcd1bf65dae6.bicep b/services/Kusto/clusters/templates/bicep/BlobsDropped_422c292e-54e3-4e7d-93e2-bcd1bf65dae6.bicep
new file mode 100644
index 000000000..3d6714932
--- /dev/null
+++ b/services/Kusto/clusters/templates/bicep/BlobsDropped_422c292e-54e3-4e7d-93e2-bcd1bf65dae6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of blobs permanently rejected by a component.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BlobsDropped'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Kusto/clusters/templates/bicep/CPU_cae6ec0a-a26d-494b-94b2-3d93dcedff42.bicep b/services/Kusto/clusters/templates/bicep/CPU_cae6ec0a-a26d-494b-94b2-3d93dcedff42.bicep
new file mode 100644
index 000000000..8badcfc49
--- /dev/null
+++ b/services/Kusto/clusters/templates/bicep/CPU_cae6ec0a-a26d-494b-94b2-3d93dcedff42.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU utilization level'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 70
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CPU'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Kusto/clusters/templates/bicep/IngestionLatencyInSeconds_8493c362-2524-4079-9025-8f5ffee62936.bicep b/services/Kusto/clusters/templates/bicep/IngestionLatencyInSeconds_8493c362-2524-4079-9025-8f5ffee62936.bicep
new file mode 100644
index 000000000..1525fcf9a
--- /dev/null
+++ b/services/Kusto/clusters/templates/bicep/IngestionLatencyInSeconds_8493c362-2524-4079-9025-8f5ffee62936.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Latency of data ingested, from the time the data was received in the cluster until it's ready for query. The ingestion latency period depends on the ingestion scenario.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1800
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Minimum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT6H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IngestionLatencyInSeconds'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Kusto/clusters/templates/bicep/IngestionResult_6c4213c5-743f-48b8-b957-dd26fbf8809e.bicep b/services/Kusto/clusters/templates/bicep/IngestionResult_6c4213c5-743f-48b8-b957-dd26fbf8809e.bicep
new file mode 100644
index 000000000..90d0096fd
--- /dev/null
+++ b/services/Kusto/clusters/templates/bicep/IngestionResult_6c4213c5-743f-48b8-b957-dd26fbf8809e.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of sources that either failed or succeeded to be ingested. Splitting the metric by status, you can get detailed information about the status of the ingestion operations.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 300
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IngestionResult'
+ dimensions: [
+ {
+ name: 'failurekind'
+ operator: 'include'
+ values: ['permanent']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Kusto/clusters/templates/bicep/KeepAlive_188fc0b5-a686-48a7-950f-76f183ba49d6.bicep b/services/Kusto/clusters/templates/bicep/KeepAlive_188fc0b5-a686-48a7-950f-76f183ba49d6.bicep
new file mode 100644
index 000000000..12984760d
--- /dev/null
+++ b/services/Kusto/clusters/templates/bicep/KeepAlive_188fc0b5-a686-48a7-950f-76f183ba49d6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Sanity check indicates the cluster responds to queries'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'KeepAlive'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/arm/ActionLatency_d8bf77d2-8572-4392-8097-5e84f136513d.json b/services/Logic/workflows/templates/arm/ActionLatency_d8bf77d2-8572-4392-8097-5e84f136513d.json
new file mode 100644
index 000000000..72eb1ed15
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/ActionLatency_d8bf77d2-8572-4392-8097-5e84f136513d.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Latency of completed workflow actions.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "ActionLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/ActionThrottledEvents_5aa5790b-2bff-40b0-9099-38485b9a9e0a.json b/services/Logic/workflows/templates/arm/ActionThrottledEvents_5aa5790b-2bff-40b0-9099-38485b9a9e0a.json
new file mode 100644
index 000000000..a917e5ae1
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/ActionThrottledEvents_5aa5790b-2bff-40b0-9099-38485b9a9e0a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow action throttled events..",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ActionThrottledEvents",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/ActionsFailed_514f695a-4f11-4a28-9516-f7f3b5b1c53b.json b/services/Logic/workflows/templates/arm/ActionsFailed_514f695a-4f11-4a28-9516-f7f3b5b1c53b.json
new file mode 100644
index 000000000..140395b12
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/ActionsFailed_514f695a-4f11-4a28-9516-f7f3b5b1c53b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow actions failed.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ActionsFailed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/RunFailurePercentage_c4864d80-dd28-4344-a135-03b600920c06.json b/services/Logic/workflows/templates/arm/RunFailurePercentage_c4864d80-dd28-4344-a135-03b600920c06.json
new file mode 100644
index 000000000..e1461a9fb
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/RunFailurePercentage_c4864d80-dd28-4344-a135-03b600920c06.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of workflow runs failed.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "50",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RunFailurePercentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/RunLatency_eb44cbdc-a259-4354-9b54-2bc72f811440.json b/services/Logic/workflows/templates/arm/RunLatency_eb44cbdc-a259-4354-9b54-2bc72f811440.json
new file mode 100644
index 000000000..10e9d1fb0
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/RunLatency_eb44cbdc-a259-4354-9b54-2bc72f811440.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Latency of completed workflow runs.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "99999",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RunLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/RunStartThrottledEvents_6524b22c-661e-48cd-87e7-7ee9ddea7b8b.json b/services/Logic/workflows/templates/arm/RunStartThrottledEvents_6524b22c-661e-48cd-87e7-7ee9ddea7b8b.json
new file mode 100644
index 000000000..0d66adea6
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/RunStartThrottledEvents_6524b22c-661e-48cd-87e7-7ee9ddea7b8b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow run start throttled events.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RunStartThrottledEvents",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/RunSuccessLatency_346ba728-f7a1-4ca4-8486-786d6ebb9f9a.json b/services/Logic/workflows/templates/arm/RunSuccessLatency_346ba728-f7a1-4ca4-8486-786d6ebb9f9a.json
new file mode 100644
index 000000000..29111bc4e
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/RunSuccessLatency_346ba728-f7a1-4ca4-8486-786d6ebb9f9a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Latency of succeeded workflow runs.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RunSuccessLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/RunThrottledEvents_9d324d21-ab2b-48b7-a637-4b1d9891d6b5.json b/services/Logic/workflows/templates/arm/RunThrottledEvents_9d324d21-ab2b-48b7-a637-4b1d9891d6b5.json
new file mode 100644
index 000000000..29006dd2b
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/RunThrottledEvents_9d324d21-ab2b-48b7-a637-4b1d9891d6b5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow action or trigger throttled events.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RunThrottledEvents",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/RunsCancelled_a4b5f1f3-aa12-4ed5-8a9d-a135204d22de.json b/services/Logic/workflows/templates/arm/RunsCancelled_a4b5f1f3-aa12-4ed5-8a9d-a135204d22de.json
new file mode 100644
index 000000000..2163c0e9c
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/RunsCancelled_a4b5f1f3-aa12-4ed5-8a9d-a135204d22de.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow runs cancelled.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RunsCancelled",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/RunsCompleted_5d020d4d-9359-4ecd-934a-409d0e4a5abd.json b/services/Logic/workflows/templates/arm/RunsCompleted_5d020d4d-9359-4ecd-934a-409d0e4a5abd.json
new file mode 100644
index 000000000..d4cd2a5d5
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/RunsCompleted_5d020d4d-9359-4ecd-934a-409d0e4a5abd.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow runs completed.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "RunsCompleted",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/RunsFailed_350cc22f-d202-4c7c-9239-cbdb3b71e14b.json b/services/Logic/workflows/templates/arm/RunsFailed_350cc22f-d202-4c7c-9239-cbdb3b71e14b.json
new file mode 100644
index 000000000..93fe35c32
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/RunsFailed_350cc22f-d202-4c7c-9239-cbdb3b71e14b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow runs failed.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RunsFailed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/RunsStarted_8f7a8cb8-feef-4eaa-9e74-18693ce9969e.json b/services/Logic/workflows/templates/arm/RunsStarted_8f7a8cb8-feef-4eaa-9e74-18693ce9969e.json
new file mode 100644
index 000000000..8c4ae877d
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/RunsStarted_8f7a8cb8-feef-4eaa-9e74-18693ce9969e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow runs started.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RunsStarted",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/RunsSucceeded_16c2d231-f28b-4146-9aa3-57d419eb8780.json b/services/Logic/workflows/templates/arm/RunsSucceeded_16c2d231-f28b-4146-9aa3-57d419eb8780.json
new file mode 100644
index 000000000..da10102d1
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/RunsSucceeded_16c2d231-f28b-4146-9aa3-57d419eb8780.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow runs succeeded.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RunsSucceeded",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/TotalBillableExecutions_85bb464e-d9ce-496a-a66d-4c6d28d808df.json b/services/Logic/workflows/templates/arm/TotalBillableExecutions_85bb464e-d9ce-496a-a66d-4c6d28d808df.json
new file mode 100644
index 000000000..ac9c4ca5f
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/TotalBillableExecutions_85bb464e-d9ce-496a-a66d-4c6d28d808df.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow executions getting billed.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalBillableExecutions",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/TriggerLatency_114f7c8e-e285-487d-9e50-7fe160769167.json b/services/Logic/workflows/templates/arm/TriggerLatency_114f7c8e-e285-487d-9e50-7fe160769167.json
new file mode 100644
index 000000000..0cadd971c
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/TriggerLatency_114f7c8e-e285-487d-9e50-7fe160769167.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Latency of completed workflow triggers.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "TriggerLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/TriggerThrottledEvents_42ae6a24-d545-4bbd-a7f9-8a3b6f977366.json b/services/Logic/workflows/templates/arm/TriggerThrottledEvents_42ae6a24-d545-4bbd-a7f9-8a3b6f977366.json
new file mode 100644
index 000000000..10b82cf15
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/TriggerThrottledEvents_42ae6a24-d545-4bbd-a7f9-8a3b6f977366.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow trigger throttled events.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TriggerThrottledEvents",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/TriggersFailed_0378fd1f-976e-4a32-aa2b-25003e7d6ee5.json b/services/Logic/workflows/templates/arm/TriggersFailed_0378fd1f-976e-4a32-aa2b-25003e7d6ee5.json
new file mode 100644
index 000000000..ffa4f99db
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/TriggersFailed_0378fd1f-976e-4a32-aa2b-25003e7d6ee5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow triggers failed.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TriggersFailed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/arm/TriggersSkipped_cb35fd68-9568-42f9-b527-44e77726b100.json b/services/Logic/workflows/templates/arm/TriggersSkipped_cb35fd68-9568-42f9-b527-44e77726b100.json
new file mode 100644
index 000000000..6b41e3849
--- /dev/null
+++ b/services/Logic/workflows/templates/arm/TriggersSkipped_cb35fd68-9568-42f9-b527-44e77726b100.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of workflow triggers skipped.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TriggersSkipped",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Logic/workflows/templates/bicep/ActionLatency_d8bf77d2-8572-4392-8097-5e84f136513d.bicep b/services/Logic/workflows/templates/bicep/ActionLatency_d8bf77d2-8572-4392-8097-5e84f136513d.bicep
new file mode 100644
index 000000000..c3e69722a
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/ActionLatency_d8bf77d2-8572-4392-8097-5e84f136513d.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Latency of completed workflow actions.'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'ActionLatency'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/ActionThrottledEvents_5aa5790b-2bff-40b0-9099-38485b9a9e0a.bicep b/services/Logic/workflows/templates/bicep/ActionThrottledEvents_5aa5790b-2bff-40b0-9099-38485b9a9e0a.bicep
new file mode 100644
index 000000000..1c610b469
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/ActionThrottledEvents_5aa5790b-2bff-40b0-9099-38485b9a9e0a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow action throttled events..'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ActionThrottledEvents'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/ActionsFailed_514f695a-4f11-4a28-9516-f7f3b5b1c53b.bicep b/services/Logic/workflows/templates/bicep/ActionsFailed_514f695a-4f11-4a28-9516-f7f3b5b1c53b.bicep
new file mode 100644
index 000000000..1a8a10e7a
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/ActionsFailed_514f695a-4f11-4a28-9516-f7f3b5b1c53b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow actions failed.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ActionsFailed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/RunFailurePercentage_c4864d80-dd28-4344-a135-03b600920c06.bicep b/services/Logic/workflows/templates/bicep/RunFailurePercentage_c4864d80-dd28-4344-a135-03b600920c06.bicep
new file mode 100644
index 000000000..1a4d2f7ed
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/RunFailurePercentage_c4864d80-dd28-4344-a135-03b600920c06.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of workflow runs failed.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 50
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RunFailurePercentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/RunLatency_eb44cbdc-a259-4354-9b54-2bc72f811440.bicep b/services/Logic/workflows/templates/bicep/RunLatency_eb44cbdc-a259-4354-9b54-2bc72f811440.bicep
new file mode 100644
index 000000000..ed0019c0a
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/RunLatency_eb44cbdc-a259-4354-9b54-2bc72f811440.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Latency of completed workflow runs.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 99999
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RunLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/RunStartThrottledEvents_6524b22c-661e-48cd-87e7-7ee9ddea7b8b.bicep b/services/Logic/workflows/templates/bicep/RunStartThrottledEvents_6524b22c-661e-48cd-87e7-7ee9ddea7b8b.bicep
new file mode 100644
index 000000000..33b902a23
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/RunStartThrottledEvents_6524b22c-661e-48cd-87e7-7ee9ddea7b8b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow run start throttled events.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RunStartThrottledEvents'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/RunSuccessLatency_346ba728-f7a1-4ca4-8486-786d6ebb9f9a.bicep b/services/Logic/workflows/templates/bicep/RunSuccessLatency_346ba728-f7a1-4ca4-8486-786d6ebb9f9a.bicep
new file mode 100644
index 000000000..64b205d66
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/RunSuccessLatency_346ba728-f7a1-4ca4-8486-786d6ebb9f9a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Latency of succeeded workflow runs.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RunSuccessLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/RunThrottledEvents_9d324d21-ab2b-48b7-a637-4b1d9891d6b5.bicep b/services/Logic/workflows/templates/bicep/RunThrottledEvents_9d324d21-ab2b-48b7-a637-4b1d9891d6b5.bicep
new file mode 100644
index 000000000..e6acca791
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/RunThrottledEvents_9d324d21-ab2b-48b7-a637-4b1d9891d6b5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow action or trigger throttled events.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RunThrottledEvents'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/RunsCancelled_a4b5f1f3-aa12-4ed5-8a9d-a135204d22de.bicep b/services/Logic/workflows/templates/bicep/RunsCancelled_a4b5f1f3-aa12-4ed5-8a9d-a135204d22de.bicep
new file mode 100644
index 000000000..f89373cf5
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/RunsCancelled_a4b5f1f3-aa12-4ed5-8a9d-a135204d22de.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow runs cancelled.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RunsCancelled'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/RunsCompleted_5d020d4d-9359-4ecd-934a-409d0e4a5abd.bicep b/services/Logic/workflows/templates/bicep/RunsCompleted_5d020d4d-9359-4ecd-934a-409d0e4a5abd.bicep
new file mode 100644
index 000000000..320219e9d
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/RunsCompleted_5d020d4d-9359-4ecd-934a-409d0e4a5abd.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow runs completed.'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'LessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'RunsCompleted'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/RunsFailed_350cc22f-d202-4c7c-9239-cbdb3b71e14b.bicep b/services/Logic/workflows/templates/bicep/RunsFailed_350cc22f-d202-4c7c-9239-cbdb3b71e14b.bicep
new file mode 100644
index 000000000..d246ddbba
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/RunsFailed_350cc22f-d202-4c7c-9239-cbdb3b71e14b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow runs failed.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RunsFailed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/RunsStarted_8f7a8cb8-feef-4eaa-9e74-18693ce9969e.bicep b/services/Logic/workflows/templates/bicep/RunsStarted_8f7a8cb8-feef-4eaa-9e74-18693ce9969e.bicep
new file mode 100644
index 000000000..08ef419ab
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/RunsStarted_8f7a8cb8-feef-4eaa-9e74-18693ce9969e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow runs started.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RunsStarted'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/RunsSucceeded_16c2d231-f28b-4146-9aa3-57d419eb8780.bicep b/services/Logic/workflows/templates/bicep/RunsSucceeded_16c2d231-f28b-4146-9aa3-57d419eb8780.bicep
new file mode 100644
index 000000000..09413bcc6
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/RunsSucceeded_16c2d231-f28b-4146-9aa3-57d419eb8780.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow runs succeeded.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RunsSucceeded'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/TotalBillableExecutions_85bb464e-d9ce-496a-a66d-4c6d28d808df.bicep b/services/Logic/workflows/templates/bicep/TotalBillableExecutions_85bb464e-d9ce-496a-a66d-4c6d28d808df.bicep
new file mode 100644
index 000000000..afe494786
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/TotalBillableExecutions_85bb464e-d9ce-496a-a66d-4c6d28d808df.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow executions getting billed.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalBillableExecutions'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/TriggerLatency_114f7c8e-e285-487d-9e50-7fe160769167.bicep b/services/Logic/workflows/templates/bicep/TriggerLatency_114f7c8e-e285-487d-9e50-7fe160769167.bicep
new file mode 100644
index 000000000..4d7c70e69
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/TriggerLatency_114f7c8e-e285-487d-9e50-7fe160769167.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Latency of completed workflow triggers.'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'TriggerLatency'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/TriggerThrottledEvents_42ae6a24-d545-4bbd-a7f9-8a3b6f977366.bicep b/services/Logic/workflows/templates/bicep/TriggerThrottledEvents_42ae6a24-d545-4bbd-a7f9-8a3b6f977366.bicep
new file mode 100644
index 000000000..3850f2b07
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/TriggerThrottledEvents_42ae6a24-d545-4bbd-a7f9-8a3b6f977366.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow trigger throttled events.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TriggerThrottledEvents'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/TriggersFailed_0378fd1f-976e-4a32-aa2b-25003e7d6ee5.bicep b/services/Logic/workflows/templates/bicep/TriggersFailed_0378fd1f-976e-4a32-aa2b-25003e7d6ee5.bicep
new file mode 100644
index 000000000..a3c18cc12
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/TriggersFailed_0378fd1f-976e-4a32-aa2b-25003e7d6ee5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow triggers failed.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TriggersFailed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Logic/workflows/templates/bicep/TriggersSkipped_cb35fd68-9568-42f9-b527-44e77726b100.bicep b/services/Logic/workflows/templates/bicep/TriggersSkipped_cb35fd68-9568-42f9-b527-44e77726b100.bicep
new file mode 100644
index 000000000..8ad60aed6
--- /dev/null
+++ b/services/Logic/workflows/templates/bicep/TriggersSkipped_cb35fd68-9568-42f9-b527-44e77726b100.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of workflow triggers skipped.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TriggersSkipped'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/MachineLearningServices/workspaces/templates/arm/FailedRuns_c897902c-40a5-497b-a0ce-86c3eda7c61d.json b/services/MachineLearningServices/workspaces/templates/arm/FailedRuns_c897902c-40a5-497b-a0ce-86c3eda7c61d.json
new file mode 100644
index 000000000..274903857
--- /dev/null
+++ b/services/MachineLearningServices/workspaces/templates/arm/FailedRuns_c897902c-40a5-497b-a0ce-86c3eda7c61d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of runs failed for this workspace. Count is updated when a run fails.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Failed Runs",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/MachineLearningServices/workspaces/templates/bicep/FailedRuns_c897902c-40a5-497b-a0ce-86c3eda7c61d.bicep b/services/MachineLearningServices/workspaces/templates/bicep/FailedRuns_c897902c-40a5-497b-a0ce-86c3eda7c61d.bicep
new file mode 100644
index 000000000..2188374d9
--- /dev/null
+++ b/services/MachineLearningServices/workspaces/templates/bicep/FailedRuns_c897902c-40a5-497b-a0ce-86c3eda7c61d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of runs failed for this workspace. Count is updated when a run fails.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Failed Runs'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-AverageReadLatency_30b0cb86-ba8b-4eeb-9067-88456ec403ad.json b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-AverageReadLatency_30b0cb86-ba8b-4eeb-9067-88456ec403ad.json
new file mode 100644
index 000000000..580c78bb5
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-AverageReadLatency_30b0cb86-ba8b-4eeb-9067-88456ec403ad.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average read latency in milliseconds per operation",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "20",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "AverageReadLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-AverageWriteLatency_075f0066-51f6-4c36-8000-ce7070493674.json b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-AverageWriteLatency_075f0066-51f6-4c36-8000-ce7070493674.json
new file mode 100644
index 000000000..61ccd4e58
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-AverageWriteLatency_075f0066-51f6-4c36-8000-ce7070493674.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average write latency in milliseconds per operation",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "20",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "AverageWriteLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-CbsVolumeOperationComplete_27768691-301d-4938-bd8a-85598c2b50c6.json b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-CbsVolumeOperationComplete_27768691-301d-4938-bd8a-85598c2b50c6.json
new file mode 100644
index 000000000..e41c91366
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-CbsVolumeOperationComplete_27768691-301d-4938-bd8a-85598c2b50c6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Did the last volume backup or restore operation complete successfully? 1 if yes, 0 if no.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CbsVolumeOperationComplete",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-VolumeAllocatedSize_1be09484-96ee-4399-8ed4-35f5f4b5c23e.json b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-VolumeAllocatedSize_1be09484-96ee-4399-8ed4-35f5f4b5c23e.json
new file mode 100644
index 000000000..fc5bfadb2
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-VolumeAllocatedSize_1be09484-96ee-4399-8ed4-35f5f4b5c23e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The provisioned size of a volume",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "107374182400",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VolumeAllocatedSize",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-VolumeConsumedSizePercentage_d474e6d2-0b9a-4912-ae61-16dc23126b3f.json b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-VolumeConsumedSizePercentage_d474e6d2-0b9a-4912-ae61-16dc23126b3f.json
new file mode 100644
index 000000000..0a5bc9f23
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-VolumeConsumedSizePercentage_d474e6d2-0b9a-4912-ae61-16dc23126b3f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of the volume consumed including snapshots.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VolumeConsumedSizePercentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-VolumeLogicalSize_149f6b6c-4729-4da4-af00-bccbb1cce9ae.json b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-VolumeLogicalSize_149f6b6c-4729-4da4-af00-bccbb1cce9ae.json
new file mode 100644
index 000000000..0b2d0f4d7
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/arm/capacityPoolsvolumes-VolumeLogicalSize_149f6b6c-4729-4da4-af00-bccbb1cce9ae.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Logical size of the volume (used bytes)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "85899345920",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VolumeLogicalSize",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-AverageReadLatency_30b0cb86-ba8b-4eeb-9067-88456ec403ad.bicep b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-AverageReadLatency_30b0cb86-ba8b-4eeb-9067-88456ec403ad.bicep
new file mode 100644
index 000000000..1acbf2bd0
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-AverageReadLatency_30b0cb86-ba8b-4eeb-9067-88456ec403ad.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average read latency in milliseconds per operation'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 20
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'AverageReadLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-AverageWriteLatency_075f0066-51f6-4c36-8000-ce7070493674.bicep b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-AverageWriteLatency_075f0066-51f6-4c36-8000-ce7070493674.bicep
new file mode 100644
index 000000000..e7d962680
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-AverageWriteLatency_075f0066-51f6-4c36-8000-ce7070493674.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average write latency in milliseconds per operation'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 20
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'AverageWriteLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-CbsVolumeOperationComplete_27768691-301d-4938-bd8a-85598c2b50c6.bicep b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-CbsVolumeOperationComplete_27768691-301d-4938-bd8a-85598c2b50c6.bicep
new file mode 100644
index 000000000..4df244b94
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-CbsVolumeOperationComplete_27768691-301d-4938-bd8a-85598c2b50c6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Did the last volume backup or restore operation complete successfully? 1 if yes, 0 if no.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CbsVolumeOperationComplete'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-VolumeAllocatedSize_1be09484-96ee-4399-8ed4-35f5f4b5c23e.bicep b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-VolumeAllocatedSize_1be09484-96ee-4399-8ed4-35f5f4b5c23e.bicep
new file mode 100644
index 000000000..704cf0cfb
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-VolumeAllocatedSize_1be09484-96ee-4399-8ed4-35f5f4b5c23e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The provisioned size of a volume'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 107374182400
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VolumeAllocatedSize'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-VolumeConsumedSizePercentage_d474e6d2-0b9a-4912-ae61-16dc23126b3f.bicep b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-VolumeConsumedSizePercentage_d474e6d2-0b9a-4912-ae61-16dc23126b3f.bicep
new file mode 100644
index 000000000..7c5e815ad
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-VolumeConsumedSizePercentage_d474e6d2-0b9a-4912-ae61-16dc23126b3f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of the volume consumed including snapshots.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VolumeConsumedSizePercentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-VolumeLogicalSize_149f6b6c-4729-4da4-af00-bccbb1cce9ae.bicep b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-VolumeLogicalSize_149f6b6c-4729-4da4-af00-bccbb1cce9ae.bicep
new file mode 100644
index 000000000..64ba8aed2
--- /dev/null
+++ b/services/NetApp/netAppAccounts/templates/bicep/capacityPoolsvolumes-VolumeLogicalSize_149f6b6c-4729-4da4-af00-bccbb1cce9ae.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Logical size of the volume (used bytes)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 85899345920
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VolumeLogicalSize'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/Deploy-AGW-ApplicationGatewayTotalTime-Alert.json b/services/Network/applicationGateways/Deploy-AGW-ApplicationGatewayTotalTime-Alert.json
index 9c9d5b475..355d1738e 100644
--- a/services/Network/applicationGateways/Deploy-AGW-ApplicationGatewayTotalTime-Alert.json
+++ b/services/Network/applicationGateways/Deploy-AGW-ApplicationGatewayTotalTime-Alert.json
@@ -8,7 +8,7 @@
"displayName": "Deploy AGW ApplicationGatewayTotalTime Alert",
"description": "Policy to audit/deploy Azure Application Gateway ApplicationGatewayTotalTime Alert",
"metadata": {
- "version": "1.3.0",
+ "version": "1.4.0",
"Category": "Networking",
"source": "https://github.com/Azure/azure-monitor-baseline-alerts/",
"_deployed_by_amba": "True"
@@ -204,7 +204,7 @@
},
{
"field": "Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity",
- "equals": "Medium"
+ "equals": "[[parameters('alertSensitivity')]"
},
{
"field": "Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert",
diff --git a/services/Network/applicationGateways/Deploy-AGW-BackendLastByteResponseTime-Alert.json b/services/Network/applicationGateways/Deploy-AGW-BackendLastByteResponseTime-Alert.json
index 151bc4653..fcf1172ca 100644
--- a/services/Network/applicationGateways/Deploy-AGW-BackendLastByteResponseTime-Alert.json
+++ b/services/Network/applicationGateways/Deploy-AGW-BackendLastByteResponseTime-Alert.json
@@ -204,7 +204,7 @@
},
{
"field": "Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity",
- "equals": "Medium"
+ "equals": "[[parameters('alertSensitivity')]"
},
{
"field": "Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert",
diff --git a/services/Network/applicationGateways/Deploy-AGW-FailedRequests-Alert.json b/services/Network/applicationGateways/Deploy-AGW-FailedRequests-Alert.json
index 741483238..0c68e680e 100644
--- a/services/Network/applicationGateways/Deploy-AGW-FailedRequests-Alert.json
+++ b/services/Network/applicationGateways/Deploy-AGW-FailedRequests-Alert.json
@@ -62,6 +62,19 @@
],
"defaultValue": "PT1M"
},
+ "alertSensitivity": {
+ "type": "String",
+ "metadata": {
+ "displayName": "Alert Sensitivity",
+ "description": "Alert Sensitivity for the alert"
+ },
+ "allowedValues": [
+ "Low",
+ "Medium",
+ "High"
+ ],
+ "defaultValue": "Medium"
+ },
"autoMitigate": {
"type": "String",
"metadata": {
@@ -184,7 +197,7 @@
},
{
"field": "Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity",
- "equals": "Medium"
+ "equals": "[[parameters('alertSensitivity')]"
},
{
"field": "Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert",
@@ -226,6 +239,9 @@
"evaluationFrequency": {
"type": "String"
},
+ "alertSensitivity": {
+ "type": "String"
+ },
"autoMitigate": {
"type": "String"
},
@@ -259,7 +275,7 @@
"metricNamespace": "Microsoft.Network/applicationgateways",
"metricName": "FailedRequests",
"operator": "GreaterThan",
- "alertSensitivity": "Medium",
+ "alertSensitivity": "[[parameters('alertSensitivity')]",
"failingPeriods": {
"minFailingPeriodsToAlert": 2,
"numberOfEvaluationPeriods": 2
@@ -281,6 +297,9 @@
"evaluationFrequency": {
"value": "[[parameters('evaluationFrequency')]"
},
+ "alertSensitivity": {
+ "value": "[[parameters('alertSensitivity')]"
+ },
"autoMitigate": {
"value": "[[parameters('autoMitigate')]"
},
@@ -308,6 +327,9 @@
"evaluationFrequency": {
"value": "[[parameters('evaluationFrequency')]"
},
+ "alertSensitivity": {
+ "value": "[[parameters('alertSensitivity')]"
+ },
"autoMitigate": {
"value": "[[parameters('autoMitigate')]"
},
diff --git a/services/Network/applicationGateways/Deploy-AGW-ResponseStatus-Alert.json b/services/Network/applicationGateways/Deploy-AGW-ResponseStatus-Alert.json
index ff412ab27..9b4c0f825 100644
--- a/services/Network/applicationGateways/Deploy-AGW-ResponseStatus-Alert.json
+++ b/services/Network/applicationGateways/Deploy-AGW-ResponseStatus-Alert.json
@@ -197,7 +197,7 @@
},
{
"field": "Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.alertSensitivity",
- "equals": "Medium"
+ "equals": "[[parameters('alertSensitivity')]"
},
{
"field": "Microsoft.Insights/metricAlerts/criteria.Microsoft-Azure-Monitor-MultipleResourceMultipleMetricCriteria.allOf[*].DynamicThresholdCriterion.failingPeriods.minFailingPeriodsToAlert",
diff --git a/services/Network/applicationGateways/templates/arm/ApplicationGatewayTotalTime_73fa1878-d22d-4e8d-922d-9f146454cc40.json b/services/Network/applicationGateways/templates/arm/ApplicationGatewayTotalTime_73fa1878-d22d-4e8d-922d-9f146454cc40.json
new file mode 100644
index 000000000..d67dbcf2c
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/ApplicationGatewayTotalTime_73fa1878-d22d-4e8d-922d-9f146454cc40.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Time that it takes for a request to be processed and its response to be sent. This is the interval from the time when Application Gateway receives the first byte of an HTTP request to the time when the response send operation finishes. It's important to note that this usually includes the Application Gateway processing time, time that the request and response packets are traveling over the network and the time the backend server took to respond.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ApplicationGatewayTotalTime",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/AzwafSecRule_d5827f03-efb6-4257-96e2-b6e34e3bef7e.json b/services/Network/applicationGateways/templates/arm/AzwafSecRule_d5827f03-efb6-4257-96e2-b6e34e3bef7e.json
new file mode 100644
index 000000000..7b6c165d3
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/AzwafSecRule_d5827f03-efb6-4257-96e2-b6e34e3bef7e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Matched Managed Rules",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "75",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "AzwafSecRule",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/BackendConnectTime_e636b3ea-da2d-42f5-aedf-12b69432ac1f.json b/services/Network/applicationGateways/templates/arm/BackendConnectTime_e636b3ea-da2d-42f5-aedf-12b69432ac1f.json
new file mode 100644
index 000000000..3eb30c34c
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/BackendConnectTime_e636b3ea-da2d-42f5-aedf-12b69432ac1f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Time spent establishing a connection with a backend server",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BackendConnectTime",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/BackendFirstByteResponseTime_3cbcad15-0bb6-423e-87c1-4d40722103d6.json b/services/Network/applicationGateways/templates/arm/BackendFirstByteResponseTime_3cbcad15-0bb6-423e-87c1-4d40722103d6.json
new file mode 100644
index 000000000..6d06d3378
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/BackendFirstByteResponseTime_3cbcad15-0bb6-423e-87c1-4d40722103d6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Time interval between start of establishing a connection to backend server and receiving the first byte of the response header, approximating processing time of backend server",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BackendFirstByteResponseTime",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/BackendLastByteResponseTime_57c7b576-d4b2-4aa7-8c58-5c0ccbf94726.json b/services/Network/applicationGateways/templates/arm/BackendLastByteResponseTime_57c7b576-d4b2-4aa7-8c58-5c0ccbf94726.json
new file mode 100644
index 000000000..066c77260
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/BackendLastByteResponseTime_57c7b576-d4b2-4aa7-8c58-5c0ccbf94726.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Time interval between start of establishing a connection to backend server and receiving the last byte of the response body",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 2,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 2,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "BackendLastByteResponseTime",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/BackendResponseStatus_c319a40c-3750-4fb4-a36d-beb3d09ef2ee.json b/services/Network/applicationGateways/templates/arm/BackendResponseStatus_c319a40c-3750-4fb4-a36d-beb3d09ef2ee.json
new file mode 100644
index 000000000..d9aafddff
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/BackendResponseStatus_c319a40c-3750-4fb4-a36d-beb3d09ef2ee.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of HTTP response codes generated by the backend members. This does not include any response codes generated by the Application Gateway.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BackendResponseStatus",
+ "dimensions": [{"operator": "include", "name": "httpstatusgroup", "values": ["5xx"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/CapacityUnits_d43ca9ef-6211-40ff-972e-fffb17923fc9.json b/services/Network/applicationGateways/templates/arm/CapacityUnits_d43ca9ef-6211-40ff-972e-fffb17923fc9.json
new file mode 100644
index 000000000..7977a189c
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/CapacityUnits_d43ca9ef-6211-40ff-972e-fffb17923fc9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Capacity Units consumed",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "75",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CapacityUnits",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/ComputeUnits_e59f4d17-2600-4bcc-ab57-6c695d37a0b2.json b/services/Network/applicationGateways/templates/arm/ComputeUnits_e59f4d17-2600-4bcc-ab57-6c695d37a0b2.json
new file mode 100644
index 000000000..9668d4c66
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/ComputeUnits_e59f4d17-2600-4bcc-ab57-6c695d37a0b2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Compute Units consumed",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "75",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ComputeUnits",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/CpuUtilization_9c8be4c5-5ba3-47ef-8a0a-97144734a336.json b/services/Network/applicationGateways/templates/arm/CpuUtilization_9c8be4c5-5ba3-47ef-8a0a-97144734a336.json
new file mode 100644
index 000000000..dd97b6157
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/CpuUtilization_9c8be4c5-5ba3-47ef-8a0a-97144734a336.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Current CPU utilization of the Application Gateway",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CpuUtilization",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/CurrentConnections_695b9710-e432-4521-9042-36287f0fc5ba.json b/services/Network/applicationGateways/templates/arm/CurrentConnections_695b9710-e432-4521-9042-36287f0fc5ba.json
new file mode 100644
index 000000000..ff4fc5137
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/CurrentConnections_695b9710-e432-4521-9042-36287f0fc5ba.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of current connections established with Application Gateway",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CurrentConnections",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/EstimatedBilledCapacityUnits_e77b6820-e115-4e33-97c1-9bb902eec3b2.json b/services/Network/applicationGateways/templates/arm/EstimatedBilledCapacityUnits_e77b6820-e115-4e33-97c1-9bb902eec3b2.json
new file mode 100644
index 000000000..c199a7ea7
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/EstimatedBilledCapacityUnits_e77b6820-e115-4e33-97c1-9bb902eec3b2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Estimated capacity units that will be charged",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "20",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "EstimatedBilledCapacityUnits",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/FailedRequests_73afde26-bd0c-4c31-8801-5b2444629448.json b/services/Network/applicationGateways/templates/arm/FailedRequests_73afde26-bd0c-4c31-8801-5b2444629448.json
new file mode 100644
index 000000000..6fd8b7218
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/FailedRequests_73afde26-bd0c-4c31-8801-5b2444629448.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of failed requests that Application Gateway has served",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FailedRequests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/HealthyHostCount_f03d1a7a-6bd3-42ae-89db-b36fd6ce5633.json b/services/Network/applicationGateways/templates/arm/HealthyHostCount_f03d1a7a-6bd3-42ae-89db-b36fd6ce5633.json
new file mode 100644
index 000000000..36bf3e40a
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/HealthyHostCount_f03d1a7a-6bd3-42ae-89db-b36fd6ce5633.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of healthy backend hosts",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "HealthyHostCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/ResponseStatus_6d77d848-23b1-4ff4-b9de-d421845d9566.json b/services/Network/applicationGateways/templates/arm/ResponseStatus_6d77d848-23b1-4ff4-b9de-d421845d9566.json
new file mode 100644
index 000000000..4d6c22be0
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/ResponseStatus_6d77d848-23b1-4ff4-b9de-d421845d9566.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Http response status returned by Application Gateway",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ResponseStatus",
+ "dimensions": [{"operator": "include", "name": "httpstatusgroup", "values": ["5xx"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/Throughput_7640663c-b2f7-41bf-9419-be5e8cfdf74e.json b/services/Network/applicationGateways/templates/arm/Throughput_7640663c-b2f7-41bf-9419-be5e8cfdf74e.json
new file mode 100644
index 000000000..aab5edd50
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/Throughput_7640663c-b2f7-41bf-9419-be5e8cfdf74e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of bytes per second the Application Gateway has served",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "167772160",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Throughput",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/TotalRequests_06982a17-4def-405d-bb59-4ecfb6486f9e.json b/services/Network/applicationGateways/templates/arm/TotalRequests_06982a17-4def-405d-bb59-4ecfb6486f9e.json
new file mode 100644
index 000000000..f828467ba
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/TotalRequests_06982a17-4def-405d-bb59-4ecfb6486f9e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of successful requests that Application Gateway has served",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalRequests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/arm/UnhealthyHostCount_c88acf4e-2d23-4ac7-93fb-e44ded53ecee.json b/services/Network/applicationGateways/templates/arm/UnhealthyHostCount_c88acf4e-2d23-4ac7-93fb-e44ded53ecee.json
new file mode 100644
index 000000000..3602d00ce
--- /dev/null
+++ b/services/Network/applicationGateways/templates/arm/UnhealthyHostCount_c88acf4e-2d23-4ac7-93fb-e44ded53ecee.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of unhealthy backend hosts",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UnhealthyHostCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/applicationGateways/templates/bicep/ApplicationGatewayTotalTime_73fa1878-d22d-4e8d-922d-9f146454cc40.bicep b/services/Network/applicationGateways/templates/bicep/ApplicationGatewayTotalTime_73fa1878-d22d-4e8d-922d-9f146454cc40.bicep
new file mode 100644
index 000000000..8e3ca530b
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/ApplicationGatewayTotalTime_73fa1878-d22d-4e8d-922d-9f146454cc40.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Time that it takes for a request to be processed and its response to be sent. This is the interval from the time when Application Gateway receives the first byte of an HTTP request to the time when the response send operation finishes. It's important to note that this usually includes the Application Gateway processing time, time that the request and response packets are traveling over the network and the time the backend server took to respond.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ApplicationGatewayTotalTime'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/AzwafSecRule_d5827f03-efb6-4257-96e2-b6e34e3bef7e.bicep b/services/Network/applicationGateways/templates/bicep/AzwafSecRule_d5827f03-efb6-4257-96e2-b6e34e3bef7e.bicep
new file mode 100644
index 000000000..74d5e292b
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/AzwafSecRule_d5827f03-efb6-4257-96e2-b6e34e3bef7e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Matched Managed Rules'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 75
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'AzwafSecRule'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/BackendConnectTime_e636b3ea-da2d-42f5-aedf-12b69432ac1f.bicep b/services/Network/applicationGateways/templates/bicep/BackendConnectTime_e636b3ea-da2d-42f5-aedf-12b69432ac1f.bicep
new file mode 100644
index 000000000..b548bb1ce
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/BackendConnectTime_e636b3ea-da2d-42f5-aedf-12b69432ac1f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Time spent establishing a connection with a backend server'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BackendConnectTime'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/BackendFirstByteResponseTime_3cbcad15-0bb6-423e-87c1-4d40722103d6.bicep b/services/Network/applicationGateways/templates/bicep/BackendFirstByteResponseTime_3cbcad15-0bb6-423e-87c1-4d40722103d6.bicep
new file mode 100644
index 000000000..7177dc8a2
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/BackendFirstByteResponseTime_3cbcad15-0bb6-423e-87c1-4d40722103d6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Time interval between start of establishing a connection to backend server and receiving the first byte of the response header, approximating processing time of backend server'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BackendFirstByteResponseTime'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/BackendLastByteResponseTime_57c7b576-d4b2-4aa7-8c58-5c0ccbf94726.bicep b/services/Network/applicationGateways/templates/bicep/BackendLastByteResponseTime_57c7b576-d4b2-4aa7-8c58-5c0ccbf94726.bicep
new file mode 100644
index 000000000..11ea6ab1e
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/BackendLastByteResponseTime_57c7b576-d4b2-4aa7-8c58-5c0ccbf94726.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Time interval between start of establishing a connection to backend server and receiving the last byte of the response body'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 2
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 2
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'BackendLastByteResponseTime'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/BackendResponseStatus_c319a40c-3750-4fb4-a36d-beb3d09ef2ee.bicep b/services/Network/applicationGateways/templates/bicep/BackendResponseStatus_c319a40c-3750-4fb4-a36d-beb3d09ef2ee.bicep
new file mode 100644
index 000000000..a111fc012
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/BackendResponseStatus_c319a40c-3750-4fb4-a36d-beb3d09ef2ee.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of HTTP response codes generated by the backend members. This does not include any response codes generated by the Application Gateway.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BackendResponseStatus'
+ dimensions: [
+ {
+ name: 'httpstatusgroup'
+ operator: 'include'
+ values: ['5xx']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/CapacityUnits_d43ca9ef-6211-40ff-972e-fffb17923fc9.bicep b/services/Network/applicationGateways/templates/bicep/CapacityUnits_d43ca9ef-6211-40ff-972e-fffb17923fc9.bicep
new file mode 100644
index 000000000..d9cfe4bc4
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/CapacityUnits_d43ca9ef-6211-40ff-972e-fffb17923fc9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Capacity Units consumed'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 75
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CapacityUnits'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/ComputeUnits_e59f4d17-2600-4bcc-ab57-6c695d37a0b2.bicep b/services/Network/applicationGateways/templates/bicep/ComputeUnits_e59f4d17-2600-4bcc-ab57-6c695d37a0b2.bicep
new file mode 100644
index 000000000..c56a63e4b
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/ComputeUnits_e59f4d17-2600-4bcc-ab57-6c695d37a0b2.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Compute Units consumed'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 75
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ComputeUnits'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/CpuUtilization_9c8be4c5-5ba3-47ef-8a0a-97144734a336.bicep b/services/Network/applicationGateways/templates/bicep/CpuUtilization_9c8be4c5-5ba3-47ef-8a0a-97144734a336.bicep
new file mode 100644
index 000000000..7521a5c31
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/CpuUtilization_9c8be4c5-5ba3-47ef-8a0a-97144734a336.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Current CPU utilization of the Application Gateway'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CpuUtilization'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/CurrentConnections_695b9710-e432-4521-9042-36287f0fc5ba.bicep b/services/Network/applicationGateways/templates/bicep/CurrentConnections_695b9710-e432-4521-9042-36287f0fc5ba.bicep
new file mode 100644
index 000000000..cbdbcbf00
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/CurrentConnections_695b9710-e432-4521-9042-36287f0fc5ba.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of current connections established with Application Gateway'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CurrentConnections'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/EstimatedBilledCapacityUnits_e77b6820-e115-4e33-97c1-9bb902eec3b2.bicep b/services/Network/applicationGateways/templates/bicep/EstimatedBilledCapacityUnits_e77b6820-e115-4e33-97c1-9bb902eec3b2.bicep
new file mode 100644
index 000000000..9d7de2144
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/EstimatedBilledCapacityUnits_e77b6820-e115-4e33-97c1-9bb902eec3b2.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Estimated capacity units that will be charged'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 20
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'EstimatedBilledCapacityUnits'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/FailedRequests_73afde26-bd0c-4c31-8801-5b2444629448.bicep b/services/Network/applicationGateways/templates/bicep/FailedRequests_73afde26-bd0c-4c31-8801-5b2444629448.bicep
new file mode 100644
index 000000000..2ce173728
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/FailedRequests_73afde26-bd0c-4c31-8801-5b2444629448.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of failed requests that Application Gateway has served'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FailedRequests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/HealthyHostCount_f03d1a7a-6bd3-42ae-89db-b36fd6ce5633.bicep b/services/Network/applicationGateways/templates/bicep/HealthyHostCount_f03d1a7a-6bd3-42ae-89db-b36fd6ce5633.bicep
new file mode 100644
index 000000000..24afb5701
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/HealthyHostCount_f03d1a7a-6bd3-42ae-89db-b36fd6ce5633.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of healthy backend hosts'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'HealthyHostCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/ResponseStatus_6d77d848-23b1-4ff4-b9de-d421845d9566.bicep b/services/Network/applicationGateways/templates/bicep/ResponseStatus_6d77d848-23b1-4ff4-b9de-d421845d9566.bicep
new file mode 100644
index 000000000..e7de12dba
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/ResponseStatus_6d77d848-23b1-4ff4-b9de-d421845d9566.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Http response status returned by Application Gateway'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ResponseStatus'
+ dimensions: [
+ {
+ name: 'httpstatusgroup'
+ operator: 'include'
+ values: ['5xx']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/Throughput_7640663c-b2f7-41bf-9419-be5e8cfdf74e.bicep b/services/Network/applicationGateways/templates/bicep/Throughput_7640663c-b2f7-41bf-9419-be5e8cfdf74e.bicep
new file mode 100644
index 000000000..9c5d1fdba
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/Throughput_7640663c-b2f7-41bf-9419-be5e8cfdf74e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of bytes per second the Application Gateway has served'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 167772160
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Throughput'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/TotalRequests_06982a17-4def-405d-bb59-4ecfb6486f9e.bicep b/services/Network/applicationGateways/templates/bicep/TotalRequests_06982a17-4def-405d-bb59-4ecfb6486f9e.bicep
new file mode 100644
index 000000000..81e2d8a3d
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/TotalRequests_06982a17-4def-405d-bb59-4ecfb6486f9e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of successful requests that Application Gateway has served'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalRequests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/applicationGateways/templates/bicep/UnhealthyHostCount_c88acf4e-2d23-4ac7-93fb-e44ded53ecee.bicep b/services/Network/applicationGateways/templates/bicep/UnhealthyHostCount_c88acf4e-2d23-4ac7-93fb-e44ded53ecee.bicep
new file mode 100644
index 000000000..f7788417d
--- /dev/null
+++ b/services/Network/applicationGateways/templates/bicep/UnhealthyHostCount_c88acf4e-2d23-4ac7-93fb-e44ded53ecee.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of unhealthy backend hosts'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UnhealthyHostCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/azureFirewalls/templates/arm/ActivityLogAzureFirewallDelete_0b0c11e3-3598-4b2f-8cd8-77a24806bb9d.json b/services/Network/azureFirewalls/templates/arm/ActivityLogAzureFirewallDelete_0b0c11e3-3598-4b2f-8cd8-77a24806bb9d.json
new file mode 100644
index 000000000..9726c15c3
--- /dev/null
+++ b/services/Network/azureFirewalls/templates/arm/ActivityLogAzureFirewallDelete_0b0c11e3-3598-4b2f-8cd8-77a24806bb9d.json
@@ -0,0 +1,95 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Activity Log Alert for Azure Firewall Delete",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "Administrative"
+ },
+ {
+ "field": "operationName",
+ "equals": "Microsoft.Network/azureFirewalls/delete"
+ },
+ {
+ "field": "status",
+ "containsAny": ["succeeded"]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/azureFirewalls/templates/arm/FirewallHealth_0ff72493-3822-4315-a146-8977a0963e39.json b/services/Network/azureFirewalls/templates/arm/FirewallHealth_0ff72493-3822-4315-a146-8977a0963e39.json
new file mode 100644
index 000000000..113f2d132
--- /dev/null
+++ b/services/Network/azureFirewalls/templates/arm/FirewallHealth_0ff72493-3822-4315-a146-8977a0963e39.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Indicates the overall health of this firewall",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FirewallHealth",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/azureFirewalls/templates/arm/SNATPortUtilization_b23f1e82-a791-4610-aaa6-2d960b48b81d.json b/services/Network/azureFirewalls/templates/arm/SNATPortUtilization_b23f1e82-a791-4610-aaa6-2d960b48b81d.json
new file mode 100644
index 000000000..a9c16b9f3
--- /dev/null
+++ b/services/Network/azureFirewalls/templates/arm/SNATPortUtilization_b23f1e82-a791-4610-aaa6-2d960b48b81d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of outbound SNAT ports currently in use",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SNATPortUtilization",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/azureFirewalls/templates/arm/Throughput_e8fdab4c-cc9a-4729-8619-a0f468f4dfdc.json b/services/Network/azureFirewalls/templates/arm/Throughput_e8fdab4c-cc9a-4729-8619-a0f468f4dfdc.json
new file mode 100644
index 000000000..40d5eeab9
--- /dev/null
+++ b/services/Network/azureFirewalls/templates/arm/Throughput_e8fdab4c-cc9a-4729-8619-a0f468f4dfdc.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Throughput processed by this firewall",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "27000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Throughput",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/azureFirewalls/templates/bicep/ActivityLogAzureFirewallDelete_0b0c11e3-3598-4b2f-8cd8-77a24806bb9d.bicep b/services/Network/azureFirewalls/templates/bicep/ActivityLogAzureFirewallDelete_0b0c11e3-3598-4b2f-8cd8-77a24806bb9d.bicep
new file mode 100644
index 000000000..d38949d79
--- /dev/null
+++ b/services/Network/azureFirewalls/templates/bicep/ActivityLogAzureFirewallDelete_0b0c11e3-3598-4b2f-8cd8-77a24806bb9d.bicep
@@ -0,0 +1,68 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Activity Log Alert for Azure Firewall Delete'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'Administrative'
+ }
+ {
+ field: 'operationName'
+ equals: 'Microsoft.Network/azureFirewalls/delete'
+ }
+ {
+ field: 'status'
+ containsAny: ['succeeded']
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/azureFirewalls/templates/bicep/FirewallHealth_0ff72493-3822-4315-a146-8977a0963e39.bicep b/services/Network/azureFirewalls/templates/bicep/FirewallHealth_0ff72493-3822-4315-a146-8977a0963e39.bicep
new file mode 100644
index 000000000..21a28924f
--- /dev/null
+++ b/services/Network/azureFirewalls/templates/bicep/FirewallHealth_0ff72493-3822-4315-a146-8977a0963e39.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Indicates the overall health of this firewall'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FirewallHealth'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/azureFirewalls/templates/bicep/SNATPortUtilization_b23f1e82-a791-4610-aaa6-2d960b48b81d.bicep b/services/Network/azureFirewalls/templates/bicep/SNATPortUtilization_b23f1e82-a791-4610-aaa6-2d960b48b81d.bicep
new file mode 100644
index 000000000..2a762f488
--- /dev/null
+++ b/services/Network/azureFirewalls/templates/bicep/SNATPortUtilization_b23f1e82-a791-4610-aaa6-2d960b48b81d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of outbound SNAT ports currently in use'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SNATPortUtilization'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/azureFirewalls/templates/bicep/Throughput_e8fdab4c-cc9a-4729-8619-a0f468f4dfdc.bicep b/services/Network/azureFirewalls/templates/bicep/Throughput_e8fdab4c-cc9a-4729-8619-a0f468f4dfdc.bicep
new file mode 100644
index 000000000..943be066e
--- /dev/null
+++ b/services/Network/azureFirewalls/templates/bicep/Throughput_e8fdab4c-cc9a-4729-8619-a0f468f4dfdc.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Throughput processed by this firewall'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 27000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Throughput'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/bastionHosts/templates/arm/BastionCommunicationStatus_afd848a8-8b18-410c-bcc1-1b6f06a5a231.json b/services/Network/bastionHosts/templates/arm/BastionCommunicationStatus_afd848a8-8b18-410c-bcc1-1b6f06a5a231.json
new file mode 100644
index 000000000..da1d50afe
--- /dev/null
+++ b/services/Network/bastionHosts/templates/arm/BastionCommunicationStatus_afd848a8-8b18-410c-bcc1-1b6f06a5a231.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Communication status shows 1 if all communication is good and 0 if its bad.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "pingmesh",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/bastionHosts/templates/arm/CPUUsage_0d4040d7-4478-46b5-98e0-14bb2f7b8ecf.json b/services/Network/bastionHosts/templates/arm/CPUUsage_0d4040d7-4478-46b5-98e0-14bb2f7b8ecf.json
new file mode 100644
index 000000000..410c3d0b4
--- /dev/null
+++ b/services/Network/bastionHosts/templates/arm/CPUUsage_0d4040d7-4478-46b5-98e0-14bb2f7b8ecf.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU Usage stats.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "85",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "usage_user",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/bastionHosts/templates/arm/MemoryUsage_2c288e52-422b-4f7e-85cf-feb3d08a1602.json b/services/Network/bastionHosts/templates/arm/MemoryUsage_2c288e52-422b-4f7e-85cf-feb3d08a1602.json
new file mode 100644
index 000000000..6d948b027
--- /dev/null
+++ b/services/Network/bastionHosts/templates/arm/MemoryUsage_2c288e52-422b-4f7e-85cf-feb3d08a1602.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory Usage stats.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "85",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "used",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/bastionHosts/templates/bicep/BastionCommunicationStatus_afd848a8-8b18-410c-bcc1-1b6f06a5a231.bicep b/services/Network/bastionHosts/templates/bicep/BastionCommunicationStatus_afd848a8-8b18-410c-bcc1-1b6f06a5a231.bicep
new file mode 100644
index 000000000..64a56f71c
--- /dev/null
+++ b/services/Network/bastionHosts/templates/bicep/BastionCommunicationStatus_afd848a8-8b18-410c-bcc1-1b6f06a5a231.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Communication status shows 1 if all communication is good and 0 if its bad.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'pingmesh'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/bastionHosts/templates/bicep/CPUUsage_0d4040d7-4478-46b5-98e0-14bb2f7b8ecf.bicep b/services/Network/bastionHosts/templates/bicep/CPUUsage_0d4040d7-4478-46b5-98e0-14bb2f7b8ecf.bicep
new file mode 100644
index 000000000..fdb901e3d
--- /dev/null
+++ b/services/Network/bastionHosts/templates/bicep/CPUUsage_0d4040d7-4478-46b5-98e0-14bb2f7b8ecf.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU Usage stats.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 85
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'usage_user'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/bastionHosts/templates/bicep/MemoryUsage_2c288e52-422b-4f7e-85cf-feb3d08a1602.bicep b/services/Network/bastionHosts/templates/bicep/MemoryUsage_2c288e52-422b-4f7e-85cf-feb3d08a1602.bicep
new file mode 100644
index 000000000..bfe3e26dd
--- /dev/null
+++ b/services/Network/bastionHosts/templates/bicep/MemoryUsage_2c288e52-422b-4f7e-85cf-feb3d08a1602.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory Usage stats.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 85
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'used'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/connections/templates/arm/BitsInPerSecond_494aa5d6-444d-4c86-9de5-431b3e12a233.json b/services/Network/connections/templates/arm/BitsInPerSecond_494aa5d6-444d-4c86-9de5-431b3e12a233.json
new file mode 100644
index 000000000..c70870c7d
--- /dev/null
+++ b/services/Network/connections/templates/arm/BitsInPerSecond_494aa5d6-444d-4c86-9de5-431b3e12a233.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Bits ingressing Azure per second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "6000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BitsInPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/connections/templates/arm/BitsOutPerSecond_b050d767-098e-4947-aa88-2a3090e62eab.json b/services/Network/connections/templates/arm/BitsOutPerSecond_b050d767-098e-4947-aa88-2a3090e62eab.json
new file mode 100644
index 000000000..825e465f4
--- /dev/null
+++ b/services/Network/connections/templates/arm/BitsOutPerSecond_b050d767-098e-4947-aa88-2a3090e62eab.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Bits egressing Azure per second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "6000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BitsOutPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/connections/templates/bicep/BitsInPerSecond_494aa5d6-444d-4c86-9de5-431b3e12a233.bicep b/services/Network/connections/templates/bicep/BitsInPerSecond_494aa5d6-444d-4c86-9de5-431b3e12a233.bicep
new file mode 100644
index 000000000..ba095e18f
--- /dev/null
+++ b/services/Network/connections/templates/bicep/BitsInPerSecond_494aa5d6-444d-4c86-9de5-431b3e12a233.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Bits ingressing Azure per second'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 6000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BitsInPerSecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/connections/templates/bicep/BitsOutPerSecond_b050d767-098e-4947-aa88-2a3090e62eab.bicep b/services/Network/connections/templates/bicep/BitsOutPerSecond_b050d767-098e-4947-aa88-2a3090e62eab.bicep
new file mode 100644
index 000000000..1a265d66f
--- /dev/null
+++ b/services/Network/connections/templates/bicep/BitsOutPerSecond_b050d767-098e-4947-aa88-2a3090e62eab.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Bits egressing Azure per second'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 6000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BitsOutPerSecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/dnszones/templates/arm/QueryVolume_0d1709ed-805e-4ca1-8490-f2d6b393e92f.json b/services/Network/dnszones/templates/arm/QueryVolume_0d1709ed-805e-4ca1-8490-f2d6b393e92f.json
new file mode 100644
index 000000000..eb51a36c8
--- /dev/null
+++ b/services/Network/dnszones/templates/arm/QueryVolume_0d1709ed-805e-4ca1-8490-f2d6b393e92f.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of queries served for a DNS zone",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterOrLessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "QueryVolume",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/dnszones/templates/arm/RecordSetCapacityUtilization_dfbcdbb7-fed8-49c5-8a10-ed34d20fc617.json b/services/Network/dnszones/templates/arm/RecordSetCapacityUtilization_dfbcdbb7-fed8-49c5-8a10-ed34d20fc617.json
new file mode 100644
index 000000000..3d8dc86f9
--- /dev/null
+++ b/services/Network/dnszones/templates/arm/RecordSetCapacityUtilization_dfbcdbb7-fed8-49c5-8a10-ed34d20fc617.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percent of Record Set capacity utilized by a DNS zone",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "60",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RecordSetCapacityUtilization",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/dnszones/templates/bicep/QueryVolume_0d1709ed-805e-4ca1-8490-f2d6b393e92f.bicep b/services/Network/dnszones/templates/bicep/QueryVolume_0d1709ed-805e-4ca1-8490-f2d6b393e92f.bicep
new file mode 100644
index 000000000..dda677eaf
--- /dev/null
+++ b/services/Network/dnszones/templates/bicep/QueryVolume_0d1709ed-805e-4ca1-8490-f2d6b393e92f.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of queries served for a DNS zone'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterOrLessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'QueryVolume'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/dnszones/templates/bicep/RecordSetCapacityUtilization_dfbcdbb7-fed8-49c5-8a10-ed34d20fc617.bicep b/services/Network/dnszones/templates/bicep/RecordSetCapacityUtilization_dfbcdbb7-fed8-49c5-8a10-ed34d20fc617.bicep
new file mode 100644
index 000000000..06ebdacaf
--- /dev/null
+++ b/services/Network/dnszones/templates/bicep/RecordSetCapacityUtilization_dfbcdbb7-fed8-49c5-8a10-ed34d20fc617.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percent of Record Set capacity utilized by a DNS zone'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 60
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RecordSetCapacityUtilization'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteCircuits/templates/arm/ArpAvailability_efc101c0-0623-4928-86a7-6f2d37faf24b.json b/services/Network/expressRouteCircuits/templates/arm/ArpAvailability_efc101c0-0623-4928-86a7-6f2d37faf24b.json
new file mode 100644
index 000000000..ec1556bd0
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/arm/ArpAvailability_efc101c0-0623-4928-86a7-6f2d37faf24b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "ARP Availability from MSEE towards all peers.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ArpAvailability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteCircuits/templates/arm/BgpAvailability_37302f31-86e2-45c8-a39f-d0b41c1271df.json b/services/Network/expressRouteCircuits/templates/arm/BgpAvailability_37302f31-86e2-45c8-a39f-d0b41c1271df.json
new file mode 100644
index 000000000..54cd345d5
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/arm/BgpAvailability_37302f31-86e2-45c8-a39f-d0b41c1271df.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "BGP Availability from MSEE towards all peers.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BgpAvailability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteCircuits/templates/arm/BitsInPerSecond_2e4ae517-3d35-4677-a4b0-441ca19e7670.json b/services/Network/expressRouteCircuits/templates/arm/BitsInPerSecond_2e4ae517-3d35-4677-a4b0-441ca19e7670.json
new file mode 100644
index 000000000..7a33979e2
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/arm/BitsInPerSecond_2e4ae517-3d35-4677-a4b0-441ca19e7670.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Bits ingressing Azure per second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "800000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BitsInPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteCircuits/templates/arm/BitsOutPerSecond_cc428042-1a21-43f7-b5f8-598dea50f4a2.json b/services/Network/expressRouteCircuits/templates/arm/BitsOutPerSecond_cc428042-1a21-43f7-b5f8-598dea50f4a2.json
new file mode 100644
index 000000000..c1f636dd6
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/arm/BitsOutPerSecond_cc428042-1a21-43f7-b5f8-598dea50f4a2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Bits egressing Azure per second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "800000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BitsOutPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteCircuits/templates/arm/QosDropBitsInPerSecond_d56551a8-1355-4aa3-871e-e20e1ce40f05.json b/services/Network/expressRouteCircuits/templates/arm/QosDropBitsInPerSecond_d56551a8-1355-4aa3-871e-e20e1ce40f05.json
new file mode 100644
index 000000000..c5952854b
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/arm/QosDropBitsInPerSecond_d56551a8-1355-4aa3-871e-e20e1ce40f05.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Ingress bits of data dropped per second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "QosDropBitsInPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteCircuits/templates/arm/QosDropBitsOutPerSecond_5808dbdb-712e-4bd3-b92e-4a08388c32c6.json b/services/Network/expressRouteCircuits/templates/arm/QosDropBitsOutPerSecond_5808dbdb-712e-4bd3-b92e-4a08388c32c6.json
new file mode 100644
index 000000000..82d2b1b44
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/arm/QosDropBitsOutPerSecond_5808dbdb-712e-4bd3-b92e-4a08388c32c6.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Egress bits of data dropped per second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "QosDropBitsOutPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteCircuits/templates/arm/globalreachbitsinpersecond_47fe6c76-47a0-433f-92d6-a23d9f573771.json b/services/Network/expressRouteCircuits/templates/arm/globalreachbitsinpersecond_47fe6c76-47a0-433f-92d6-a23d9f573771.json
new file mode 100644
index 000000000..9c204cc41
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/arm/globalreachbitsinpersecond_47fe6c76-47a0-433f-92d6-a23d9f573771.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": ,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "globalreachbitsinpersecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteCircuits/templates/arm/globalreachbitsoutpersecond_8a586e59-0f53-41bd-8406-174f9f0ecf7e.json b/services/Network/expressRouteCircuits/templates/arm/globalreachbitsoutpersecond_8a586e59-0f53-41bd-8406-174f9f0ecf7e.json
new file mode 100644
index 000000000..4e1e68fbf
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/arm/globalreachbitsoutpersecond_8a586e59-0f53-41bd-8406-174f9f0ecf7e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": ,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "globalreachbitsoutpersecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteCircuits/templates/bicep/ArpAvailability_efc101c0-0623-4928-86a7-6f2d37faf24b.bicep b/services/Network/expressRouteCircuits/templates/bicep/ArpAvailability_efc101c0-0623-4928-86a7-6f2d37faf24b.bicep
new file mode 100644
index 000000000..daa53ab9b
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/bicep/ArpAvailability_efc101c0-0623-4928-86a7-6f2d37faf24b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'ARP Availability from MSEE towards all peers.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ArpAvailability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteCircuits/templates/bicep/BgpAvailability_37302f31-86e2-45c8-a39f-d0b41c1271df.bicep b/services/Network/expressRouteCircuits/templates/bicep/BgpAvailability_37302f31-86e2-45c8-a39f-d0b41c1271df.bicep
new file mode 100644
index 000000000..625fe1f21
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/bicep/BgpAvailability_37302f31-86e2-45c8-a39f-d0b41c1271df.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'BGP Availability from MSEE towards all peers.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BgpAvailability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteCircuits/templates/bicep/BitsInPerSecond_2e4ae517-3d35-4677-a4b0-441ca19e7670.bicep b/services/Network/expressRouteCircuits/templates/bicep/BitsInPerSecond_2e4ae517-3d35-4677-a4b0-441ca19e7670.bicep
new file mode 100644
index 000000000..234875786
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/bicep/BitsInPerSecond_2e4ae517-3d35-4677-a4b0-441ca19e7670.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Bits ingressing Azure per second'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 800000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BitsInPerSecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteCircuits/templates/bicep/BitsOutPerSecond_cc428042-1a21-43f7-b5f8-598dea50f4a2.bicep b/services/Network/expressRouteCircuits/templates/bicep/BitsOutPerSecond_cc428042-1a21-43f7-b5f8-598dea50f4a2.bicep
new file mode 100644
index 000000000..985a80edb
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/bicep/BitsOutPerSecond_cc428042-1a21-43f7-b5f8-598dea50f4a2.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Bits egressing Azure per second'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 800000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BitsOutPerSecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteCircuits/templates/bicep/QosDropBitsInPerSecond_d56551a8-1355-4aa3-871e-e20e1ce40f05.bicep b/services/Network/expressRouteCircuits/templates/bicep/QosDropBitsInPerSecond_d56551a8-1355-4aa3-871e-e20e1ce40f05.bicep
new file mode 100644
index 000000000..bb3f37c93
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/bicep/QosDropBitsInPerSecond_d56551a8-1355-4aa3-871e-e20e1ce40f05.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Ingress bits of data dropped per second'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'QosDropBitsInPerSecond'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteCircuits/templates/bicep/QosDropBitsOutPerSecond_5808dbdb-712e-4bd3-b92e-4a08388c32c6.bicep b/services/Network/expressRouteCircuits/templates/bicep/QosDropBitsOutPerSecond_5808dbdb-712e-4bd3-b92e-4a08388c32c6.bicep
new file mode 100644
index 000000000..d91becbaf
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/bicep/QosDropBitsOutPerSecond_5808dbdb-712e-4bd3-b92e-4a08388c32c6.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Egress bits of data dropped per second'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'QosDropBitsOutPerSecond'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteCircuits/templates/bicep/globalreachbitsinpersecond_47fe6c76-47a0-433f-92d6-a23d9f573771.bicep b/services/Network/expressRouteCircuits/templates/bicep/globalreachbitsinpersecond_47fe6c76-47a0-433f-92d6-a23d9f573771.bicep
new file mode 100644
index 000000000..95c38f868
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/bicep/globalreachbitsinpersecond_47fe6c76-47a0-433f-92d6-a23d9f573771.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = ''
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int =
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = ''
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = ''
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = ''
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'globalreachbitsinpersecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteCircuits/templates/bicep/globalreachbitsoutpersecond_8a586e59-0f53-41bd-8406-174f9f0ecf7e.bicep b/services/Network/expressRouteCircuits/templates/bicep/globalreachbitsoutpersecond_8a586e59-0f53-41bd-8406-174f9f0ecf7e.bicep
new file mode 100644
index 000000000..766fd21fd
--- /dev/null
+++ b/services/Network/expressRouteCircuits/templates/bicep/globalreachbitsoutpersecond_8a586e59-0f53-41bd-8406-174f9f0ecf7e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = ''
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int =
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = ''
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = ''
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = ''
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'globalreachbitsoutpersecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteGateways/templates/arm/ERGatewayConnectionBitsInPerSecond_ff147700-c9e6-4063-bb23-45500c00067a.json b/services/Network/expressRouteGateways/templates/arm/ERGatewayConnectionBitsInPerSecond_ff147700-c9e6-4063-bb23-45500c00067a.json
new file mode 100644
index 000000000..210ac1e87
--- /dev/null
+++ b/services/Network/expressRouteGateways/templates/arm/ERGatewayConnectionBitsInPerSecond_ff147700-c9e6-4063-bb23-45500c00067a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "ERGatewayConnectionBitsInPerSecond",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ERGatewayConnectionBitsInPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteGateways/templates/arm/ERGatewayConnectionBitsOutPerSecond_4d5c7854-e044-4dd6-971b-df433fa3ad37.json b/services/Network/expressRouteGateways/templates/arm/ERGatewayConnectionBitsOutPerSecond_4d5c7854-e044-4dd6-971b-df433fa3ad37.json
new file mode 100644
index 000000000..c4f4f1738
--- /dev/null
+++ b/services/Network/expressRouteGateways/templates/arm/ERGatewayConnectionBitsOutPerSecond_4d5c7854-e044-4dd6-971b-df433fa3ad37.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for ER Gateway Connection BitsOutPerSecond",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ERGatewayConnectionBitsOutPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteGateways/templates/arm/ExpressRouteGatewayCpuUtilization_af1ba971-9b73-4b7f-8040-5eff9f5778d5.json b/services/Network/expressRouteGateways/templates/arm/ExpressRouteGatewayCpuUtilization_af1ba971-9b73-4b7f-8040-5eff9f5778d5.json
new file mode 100644
index 000000000..d678bba07
--- /dev/null
+++ b/services/Network/expressRouteGateways/templates/arm/ExpressRouteGatewayCpuUtilization_af1ba971-9b73-4b7f-8040-5eff9f5778d5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for ER Gateway Express Route CPU Utilization",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ExpressRouteGatewayCpuUtilization",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRouteGateways/templates/bicep/ERGatewayConnectionBitsInPerSecond_ff147700-c9e6-4063-bb23-45500c00067a.bicep b/services/Network/expressRouteGateways/templates/bicep/ERGatewayConnectionBitsInPerSecond_ff147700-c9e6-4063-bb23-45500c00067a.bicep
new file mode 100644
index 000000000..2a7588fef
--- /dev/null
+++ b/services/Network/expressRouteGateways/templates/bicep/ERGatewayConnectionBitsInPerSecond_ff147700-c9e6-4063-bb23-45500c00067a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'ERGatewayConnectionBitsInPerSecond'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ERGatewayConnectionBitsInPerSecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteGateways/templates/bicep/ERGatewayConnectionBitsOutPerSecond_4d5c7854-e044-4dd6-971b-df433fa3ad37.bicep b/services/Network/expressRouteGateways/templates/bicep/ERGatewayConnectionBitsOutPerSecond_4d5c7854-e044-4dd6-971b-df433fa3ad37.bicep
new file mode 100644
index 000000000..cd929c6f3
--- /dev/null
+++ b/services/Network/expressRouteGateways/templates/bicep/ERGatewayConnectionBitsOutPerSecond_4d5c7854-e044-4dd6-971b-df433fa3ad37.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for ER Gateway Connection BitsOutPerSecond'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ERGatewayConnectionBitsOutPerSecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRouteGateways/templates/bicep/ExpressRouteGatewayCpuUtilization_af1ba971-9b73-4b7f-8040-5eff9f5778d5.bicep b/services/Network/expressRouteGateways/templates/bicep/ExpressRouteGatewayCpuUtilization_af1ba971-9b73-4b7f-8040-5eff9f5778d5.bicep
new file mode 100644
index 000000000..7b581a9d2
--- /dev/null
+++ b/services/Network/expressRouteGateways/templates/bicep/ExpressRouteGatewayCpuUtilization_af1ba971-9b73-4b7f-8040-5eff9f5778d5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for ER Gateway Express Route CPU Utilization'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ExpressRouteGatewayCpuUtilization'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRoutePorts/templates/arm/LineProtocol_0fac138d-cf48-4dc2-ac02-053d0b24e620.json b/services/Network/expressRoutePorts/templates/arm/LineProtocol_0fac138d-cf48-4dc2-ac02-053d0b24e620.json
new file mode 100644
index 000000000..48082d20d
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/arm/LineProtocol_0fac138d-cf48-4dc2-ac02-053d0b24e620.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for ER Direct Connection LineProtocol",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "LineProtocol",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRoutePorts/templates/arm/PortBitsInPerSecond_08dad105-6416-4348-9feb-339f73e24262.json b/services/Network/expressRoutePorts/templates/arm/PortBitsInPerSecond_08dad105-6416-4348-9feb-339f73e24262.json
new file mode 100644
index 000000000..ea83c4221
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/arm/PortBitsInPerSecond_08dad105-6416-4348-9feb-339f73e24262.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for ER Direct Connection BitsInPerSecond",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PortBitsInPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRoutePorts/templates/arm/PortBitsOutPerSecond_ca29484c-b6e5-467e-984d-567e262380d7.json b/services/Network/expressRoutePorts/templates/arm/PortBitsOutPerSecond_ca29484c-b6e5-467e-984d-567e262380d7.json
new file mode 100644
index 000000000..98c6014af
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/arm/PortBitsOutPerSecond_ca29484c-b6e5-467e-984d-567e262380d7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for ER Direct Connection BitsOutPerSecond",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PortBitsOutPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRoutePorts/templates/arm/RxLightLevel-High_ceaeccae-ffa5-4c8c-8415-c7be8266977d.json b/services/Network/expressRoutePorts/templates/arm/RxLightLevel-High_ceaeccae-ffa5-4c8c-8415-c7be8266977d.json
new file mode 100644
index 000000000..babbd2106
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/arm/RxLightLevel-High_ceaeccae-ffa5-4c8c-8415-c7be8266977d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for ER Direct Connection RxLightLevel High",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RxLightLevel",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRoutePorts/templates/arm/RxLightLevel-Low_bf37971c-60f4-4652-a059-7607b1d6d31b.json b/services/Network/expressRoutePorts/templates/arm/RxLightLevel-Low_bf37971c-60f4-4652-a059-7607b1d6d31b.json
new file mode 100644
index 000000000..e2c10bd01
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/arm/RxLightLevel-Low_bf37971c-60f4-4652-a059-7607b1d6d31b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for ER Direct Connection RxLightLevel Low",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "-10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RxLightLevel",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRoutePorts/templates/arm/TxLightLevel-High_dee0e83f-8d5c-4735-9730-1a850354e4b1.json b/services/Network/expressRoutePorts/templates/arm/TxLightLevel-High_dee0e83f-8d5c-4735-9730-1a850354e4b1.json
new file mode 100644
index 000000000..688243422
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/arm/TxLightLevel-High_dee0e83f-8d5c-4735-9730-1a850354e4b1.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for ER Direct Connection TxLightLevel High",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TxLightLevel",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRoutePorts/templates/arm/TxLightLevel-Low_378a85f8-f24c-4ce6-bfb0-eb5ccbd61768.json b/services/Network/expressRoutePorts/templates/arm/TxLightLevel-Low_378a85f8-f24c-4ce6-bfb0-eb5ccbd61768.json
new file mode 100644
index 000000000..6437f787f
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/arm/TxLightLevel-Low_378a85f8-f24c-4ce6-bfb0-eb5ccbd61768.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for ER Direct Connection TxLightLevel Low",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "-10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TxLightLevel",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/expressRoutePorts/templates/bicep/LineProtocol_0fac138d-cf48-4dc2-ac02-053d0b24e620.bicep b/services/Network/expressRoutePorts/templates/bicep/LineProtocol_0fac138d-cf48-4dc2-ac02-053d0b24e620.bicep
new file mode 100644
index 000000000..20ee0c9e4
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/bicep/LineProtocol_0fac138d-cf48-4dc2-ac02-053d0b24e620.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for ER Direct Connection LineProtocol'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'LineProtocol'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRoutePorts/templates/bicep/PortBitsInPerSecond_08dad105-6416-4348-9feb-339f73e24262.bicep b/services/Network/expressRoutePorts/templates/bicep/PortBitsInPerSecond_08dad105-6416-4348-9feb-339f73e24262.bicep
new file mode 100644
index 000000000..ce7c8a119
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/bicep/PortBitsInPerSecond_08dad105-6416-4348-9feb-339f73e24262.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for ER Direct Connection BitsInPerSecond'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PortBitsInPerSecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRoutePorts/templates/bicep/PortBitsOutPerSecond_ca29484c-b6e5-467e-984d-567e262380d7.bicep b/services/Network/expressRoutePorts/templates/bicep/PortBitsOutPerSecond_ca29484c-b6e5-467e-984d-567e262380d7.bicep
new file mode 100644
index 000000000..5b143028f
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/bicep/PortBitsOutPerSecond_ca29484c-b6e5-467e-984d-567e262380d7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for ER Direct Connection BitsOutPerSecond'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PortBitsOutPerSecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRoutePorts/templates/bicep/RxLightLevel-High_ceaeccae-ffa5-4c8c-8415-c7be8266977d.bicep b/services/Network/expressRoutePorts/templates/bicep/RxLightLevel-High_ceaeccae-ffa5-4c8c-8415-c7be8266977d.bicep
new file mode 100644
index 000000000..a3d7d3620
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/bicep/RxLightLevel-High_ceaeccae-ffa5-4c8c-8415-c7be8266977d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for ER Direct Connection RxLightLevel High'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RxLightLevel'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRoutePorts/templates/bicep/RxLightLevel-Low_bf37971c-60f4-4652-a059-7607b1d6d31b.bicep b/services/Network/expressRoutePorts/templates/bicep/RxLightLevel-Low_bf37971c-60f4-4652-a059-7607b1d6d31b.bicep
new file mode 100644
index 000000000..e0a00f584
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/bicep/RxLightLevel-Low_bf37971c-60f4-4652-a059-7607b1d6d31b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for ER Direct Connection RxLightLevel Low'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = -10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RxLightLevel'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRoutePorts/templates/bicep/TxLightLevel-High_dee0e83f-8d5c-4735-9730-1a850354e4b1.bicep b/services/Network/expressRoutePorts/templates/bicep/TxLightLevel-High_dee0e83f-8d5c-4735-9730-1a850354e4b1.bicep
new file mode 100644
index 000000000..50fd7582f
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/bicep/TxLightLevel-High_dee0e83f-8d5c-4735-9730-1a850354e4b1.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for ER Direct Connection TxLightLevel High'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TxLightLevel'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/expressRoutePorts/templates/bicep/TxLightLevel-Low_378a85f8-f24c-4ce6-bfb0-eb5ccbd61768.bicep b/services/Network/expressRoutePorts/templates/bicep/TxLightLevel-Low_378a85f8-f24c-4ce6-bfb0-eb5ccbd61768.bicep
new file mode 100644
index 000000000..022bd455e
--- /dev/null
+++ b/services/Network/expressRoutePorts/templates/bicep/TxLightLevel-Low_378a85f8-f24c-4ce6-bfb0-eb5ccbd61768.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for ER Direct Connection TxLightLevel Low'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = -10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TxLightLevel'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/frontDoors/Deploy-FD-BackendHealth-Alert.json b/services/Network/frontDoors/Deploy-FD-BackendHealth-Alert.json
index 7c5958771..3fb9545d1 100644
--- a/services/Network/frontDoors/Deploy-FD-BackendHealth-Alert.json
+++ b/services/Network/frontDoors/Deploy-FD-BackendHealth-Alert.json
@@ -45,7 +45,7 @@
"PT12H",
"P1D"
],
- "defaultValue": "PT5M"
+ "defaultValue": "PT15M"
},
"evaluationFrequency": {
"type": "String",
diff --git a/services/Network/frontDoors/templates/arm/BackendHealthPercentage_15a67b66-30eb-4d0f-aa98-7350304347d0.json b/services/Network/frontDoors/templates/arm/BackendHealthPercentage_15a67b66-30eb-4d0f-aa98-7350304347d0.json
new file mode 100644
index 000000000..51b07cbfc
--- /dev/null
+++ b/services/Network/frontDoors/templates/arm/BackendHealthPercentage_15a67b66-30eb-4d0f-aa98-7350304347d0.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of successful health probes from the HTTP/S proxy to backends",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BackendHealthPercentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/frontDoors/templates/arm/BackendRequestLatency_a4de0a96-9e79-4a03-a91c-cbd09ea3d29a.json b/services/Network/frontDoors/templates/arm/BackendRequestLatency_a4de0a96-9e79-4a03-a91c-cbd09ea3d29a.json
new file mode 100644
index 000000000..d4321d386
--- /dev/null
+++ b/services/Network/frontDoors/templates/arm/BackendRequestLatency_a4de0a96-9e79-4a03-a91c-cbd09ea3d29a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The time calculated from when the request was sent by the HTTP/S proxy to the backend until the HTTP/S proxy received the last response byte from the backend",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "15000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BackendRequestLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/frontDoors/templates/arm/RequestCount_5ec4f863-ec6f-4fe8-b258-a53b3183138a.json b/services/Network/frontDoors/templates/arm/RequestCount_5ec4f863-ec6f-4fe8-b258-a53b3183138a.json
new file mode 100644
index 000000000..853549f2f
--- /dev/null
+++ b/services/Network/frontDoors/templates/arm/RequestCount_5ec4f863-ec6f-4fe8-b258-a53b3183138a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of client requests served by the HTTP/S proxy",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RequestCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/frontDoors/templates/arm/TotalLatency_1987b5a9-bbc3-43c6-af35-cd69e61fe043.json b/services/Network/frontDoors/templates/arm/TotalLatency_1987b5a9-bbc3-43c6-af35-cd69e61fe043.json
new file mode 100644
index 000000000..c928ed15b
--- /dev/null
+++ b/services/Network/frontDoors/templates/arm/TotalLatency_1987b5a9-bbc3-43c6-af35-cd69e61fe043.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The time calculated from when the client request was received by the HTTP/S proxy until the client acknowledged the last response byte from the HTTP/S proxy",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "25000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/frontDoors/templates/bicep/BackendHealthPercentage_15a67b66-30eb-4d0f-aa98-7350304347d0.bicep b/services/Network/frontDoors/templates/bicep/BackendHealthPercentage_15a67b66-30eb-4d0f-aa98-7350304347d0.bicep
new file mode 100644
index 000000000..ef2535585
--- /dev/null
+++ b/services/Network/frontDoors/templates/bicep/BackendHealthPercentage_15a67b66-30eb-4d0f-aa98-7350304347d0.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of successful health probes from the HTTP/S proxy to backends'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BackendHealthPercentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/frontDoors/templates/bicep/BackendRequestLatency_a4de0a96-9e79-4a03-a91c-cbd09ea3d29a.bicep b/services/Network/frontDoors/templates/bicep/BackendRequestLatency_a4de0a96-9e79-4a03-a91c-cbd09ea3d29a.bicep
new file mode 100644
index 000000000..927ecdb7f
--- /dev/null
+++ b/services/Network/frontDoors/templates/bicep/BackendRequestLatency_a4de0a96-9e79-4a03-a91c-cbd09ea3d29a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The time calculated from when the request was sent by the HTTP/S proxy to the backend until the HTTP/S proxy received the last response byte from the backend'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 15000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BackendRequestLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/frontDoors/templates/bicep/RequestCount_5ec4f863-ec6f-4fe8-b258-a53b3183138a.bicep b/services/Network/frontDoors/templates/bicep/RequestCount_5ec4f863-ec6f-4fe8-b258-a53b3183138a.bicep
new file mode 100644
index 000000000..20871d56d
--- /dev/null
+++ b/services/Network/frontDoors/templates/bicep/RequestCount_5ec4f863-ec6f-4fe8-b258-a53b3183138a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of client requests served by the HTTP/S proxy'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RequestCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/frontDoors/templates/bicep/TotalLatency_1987b5a9-bbc3-43c6-af35-cd69e61fe043.bicep b/services/Network/frontDoors/templates/bicep/TotalLatency_1987b5a9-bbc3-43c6-af35-cd69e61fe043.bicep
new file mode 100644
index 000000000..f7dc48a74
--- /dev/null
+++ b/services/Network/frontDoors/templates/bicep/TotalLatency_1987b5a9-bbc3-43c6-af35-cd69e61fe043.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The time calculated from when the client request was received by the HTTP/S proxy until the client acknowledged the last response byte from the HTTP/S proxy'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 25000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/loadBalancers/templates/arm/AllocatedSnartPorts_5b64d91c-54de-4f8c-a5d6-054967f4ceaf.json b/services/Network/loadBalancers/templates/arm/AllocatedSnartPorts_5b64d91c-54de-4f8c-a5d6-054967f4ceaf.json
new file mode 100644
index 000000000..2c850d3e3
--- /dev/null
+++ b/services/Network/loadBalancers/templates/arm/AllocatedSnartPorts_5b64d91c-54de-4f8c-a5d6-054967f4ceaf.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "total number of port allocated for SNAT",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "AllocatedSnartPorts",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/loadBalancers/templates/arm/ByteCount_d15179b2-4b57-41e4-997b-dc7c380963d9.json b/services/Network/loadBalancers/templates/arm/ByteCount_d15179b2-4b57-41e4-997b-dc7c380963d9.json
new file mode 100644
index 000000000..c29225301
--- /dev/null
+++ b/services/Network/loadBalancers/templates/arm/ByteCount_d15179b2-4b57-41e4-997b-dc7c380963d9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of bytes passing through load balancer",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Bytecount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/loadBalancers/templates/arm/DipAvailability_a39efd3b-04ef-48d4-a862-053092bdd6e5.json b/services/Network/loadBalancers/templates/arm/DipAvailability_a39efd3b-04ef-48d4-a862-053092bdd6e5.json
new file mode 100644
index 000000000..48d607559
--- /dev/null
+++ b/services/Network/loadBalancers/templates/arm/DipAvailability_a39efd3b-04ef-48d4-a862-053092bdd6e5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average Load Balancer health probe status per time duration",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DipAvailability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/loadBalancers/templates/arm/GlobalBackendAvailability_055c20da-0d21-4c6a-a80b-f2c4b3887804.json b/services/Network/loadBalancers/templates/arm/GlobalBackendAvailability_055c20da-0d21-4c6a-a80b-f2c4b3887804.json
new file mode 100644
index 000000000..7db1a37d4
--- /dev/null
+++ b/services/Network/loadBalancers/templates/arm/GlobalBackendAvailability_055c20da-0d21-4c6a-a80b-f2c4b3887804.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for Global Backend Availability",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "GlobalBackendAvailability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/loadBalancers/templates/arm/PacketCount_d766dc3e-42cc-42a7-ba4f-3c1d7fa295c5.json b/services/Network/loadBalancers/templates/arm/PacketCount_d766dc3e-42cc-42a7-ba4f-3c1d7fa295c5.json
new file mode 100644
index 000000000..99b1b2fa7
--- /dev/null
+++ b/services/Network/loadBalancers/templates/arm/PacketCount_d766dc3e-42cc-42a7-ba4f-3c1d7fa295c5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "total number of packet passing through load balancer",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PacketCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/loadBalancers/templates/arm/SYNCount_94c90db6-8fd7-460c-b704-c2a429913376.json b/services/Network/loadBalancers/templates/arm/SYNCount_94c90db6-8fd7-460c-b704-c2a429913376.json
new file mode 100644
index 000000000..e84c46775
--- /dev/null
+++ b/services/Network/loadBalancers/templates/arm/SYNCount_94c90db6-8fd7-460c-b704-c2a429913376.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "number of syn packet which represent an attempt to establish tcp connection.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SYNCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/loadBalancers/templates/arm/SnatConnectionCount_39d3123b-daaa-4f70-97a3-8a4f326104af.json b/services/Network/loadBalancers/templates/arm/SnatConnectionCount_39d3123b-daaa-4f70-97a3-8a4f326104af.json
new file mode 100644
index 000000000..bc36fec82
--- /dev/null
+++ b/services/Network/loadBalancers/templates/arm/SnatConnectionCount_39d3123b-daaa-4f70-97a3-8a4f326104af.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of new SNAT connections created within time period",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SnatConnectionCount",
+ "dimensions": [{"operator": "include", "name": "connectionstate", "values": ["failed"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/loadBalancers/templates/arm/UsedSNATPorts_a92cb746-f19f-450b-b413-8b9710b0176b.json b/services/Network/loadBalancers/templates/arm/UsedSNATPorts_a92cb746-f19f-450b-b413-8b9710b0176b.json
new file mode 100644
index 000000000..81672d4ca
--- /dev/null
+++ b/services/Network/loadBalancers/templates/arm/UsedSNATPorts_a92cb746-f19f-450b-b413-8b9710b0176b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for ALB Used SNAT Ports",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "900",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UsedSNATPorts",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/loadBalancers/templates/arm/VipAvailability_b239797f-e627-4e48-8609-94db72098c3d.json b/services/Network/loadBalancers/templates/arm/VipAvailability_b239797f-e627-4e48-8609-94db72098c3d.json
new file mode 100644
index 000000000..9cf24fcf8
--- /dev/null
+++ b/services/Network/loadBalancers/templates/arm/VipAvailability_b239797f-e627-4e48-8609-94db72098c3d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average Load Balancer data path availability per time duration",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VipAvailability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/loadBalancers/templates/bicep/AllocatedSnartPorts_5b64d91c-54de-4f8c-a5d6-054967f4ceaf.bicep b/services/Network/loadBalancers/templates/bicep/AllocatedSnartPorts_5b64d91c-54de-4f8c-a5d6-054967f4ceaf.bicep
new file mode 100644
index 000000000..af803b806
--- /dev/null
+++ b/services/Network/loadBalancers/templates/bicep/AllocatedSnartPorts_5b64d91c-54de-4f8c-a5d6-054967f4ceaf.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'total number of port allocated for SNAT'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = ''
+
+@description('The threshold value at which the alert is activated.')
+param threshold int =
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'AllocatedSnartPorts'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/loadBalancers/templates/bicep/ByteCount_d15179b2-4b57-41e4-997b-dc7c380963d9.bicep b/services/Network/loadBalancers/templates/bicep/ByteCount_d15179b2-4b57-41e4-997b-dc7c380963d9.bicep
new file mode 100644
index 000000000..8708c4470
--- /dev/null
+++ b/services/Network/loadBalancers/templates/bicep/ByteCount_d15179b2-4b57-41e4-997b-dc7c380963d9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of bytes passing through load balancer'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = ''
+
+@description('The threshold value at which the alert is activated.')
+param threshold int =
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Bytecount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/loadBalancers/templates/bicep/DipAvailability_a39efd3b-04ef-48d4-a862-053092bdd6e5.bicep b/services/Network/loadBalancers/templates/bicep/DipAvailability_a39efd3b-04ef-48d4-a862-053092bdd6e5.bicep
new file mode 100644
index 000000000..7fb477d4f
--- /dev/null
+++ b/services/Network/loadBalancers/templates/bicep/DipAvailability_a39efd3b-04ef-48d4-a862-053092bdd6e5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average Load Balancer health probe status per time duration'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DipAvailability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/loadBalancers/templates/bicep/GlobalBackendAvailability_055c20da-0d21-4c6a-a80b-f2c4b3887804.bicep b/services/Network/loadBalancers/templates/bicep/GlobalBackendAvailability_055c20da-0d21-4c6a-a80b-f2c4b3887804.bicep
new file mode 100644
index 000000000..662622e05
--- /dev/null
+++ b/services/Network/loadBalancers/templates/bicep/GlobalBackendAvailability_055c20da-0d21-4c6a-a80b-f2c4b3887804.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for Global Backend Availability'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'GlobalBackendAvailability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/loadBalancers/templates/bicep/PacketCount_d766dc3e-42cc-42a7-ba4f-3c1d7fa295c5.bicep b/services/Network/loadBalancers/templates/bicep/PacketCount_d766dc3e-42cc-42a7-ba4f-3c1d7fa295c5.bicep
new file mode 100644
index 000000000..c5954623a
--- /dev/null
+++ b/services/Network/loadBalancers/templates/bicep/PacketCount_d766dc3e-42cc-42a7-ba4f-3c1d7fa295c5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'total number of packet passing through load balancer'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = ''
+
+@description('The threshold value at which the alert is activated.')
+param threshold int =
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PacketCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/loadBalancers/templates/bicep/SYNCount_94c90db6-8fd7-460c-b704-c2a429913376.bicep b/services/Network/loadBalancers/templates/bicep/SYNCount_94c90db6-8fd7-460c-b704-c2a429913376.bicep
new file mode 100644
index 000000000..aa0d6db2a
--- /dev/null
+++ b/services/Network/loadBalancers/templates/bicep/SYNCount_94c90db6-8fd7-460c-b704-c2a429913376.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'number of syn packet which represent an attempt to establish tcp connection.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = ''
+
+@description('The threshold value at which the alert is activated.')
+param threshold int =
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SYNCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/loadBalancers/templates/bicep/SnatConnectionCount_39d3123b-daaa-4f70-97a3-8a4f326104af.bicep b/services/Network/loadBalancers/templates/bicep/SnatConnectionCount_39d3123b-daaa-4f70-97a3-8a4f326104af.bicep
new file mode 100644
index 000000000..f788cd8e4
--- /dev/null
+++ b/services/Network/loadBalancers/templates/bicep/SnatConnectionCount_39d3123b-daaa-4f70-97a3-8a4f326104af.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of new SNAT connections created within time period'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SnatConnectionCount'
+ dimensions: [
+ {
+ name: 'connectionstate'
+ operator: 'include'
+ values: ['failed']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/loadBalancers/templates/bicep/UsedSNATPorts_a92cb746-f19f-450b-b413-8b9710b0176b.bicep b/services/Network/loadBalancers/templates/bicep/UsedSNATPorts_a92cb746-f19f-450b-b413-8b9710b0176b.bicep
new file mode 100644
index 000000000..a66ac607f
--- /dev/null
+++ b/services/Network/loadBalancers/templates/bicep/UsedSNATPorts_a92cb746-f19f-450b-b413-8b9710b0176b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for ALB Used SNAT Ports'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 900
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UsedSNATPorts'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/loadBalancers/templates/bicep/VipAvailability_b239797f-e627-4e48-8609-94db72098c3d.bicep b/services/Network/loadBalancers/templates/bicep/VipAvailability_b239797f-e627-4e48-8609-94db72098c3d.bicep
new file mode 100644
index 000000000..99ebe3f0f
--- /dev/null
+++ b/services/Network/loadBalancers/templates/bicep/VipAvailability_b239797f-e627-4e48-8609-94db72098c3d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average Load Balancer data path availability per time duration'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VipAvailability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/natGateways/templates/arm/ByteCount_e1808855-9a4d-464d-b75a-a41183c520bd.json b/services/Network/natGateways/templates/arm/ByteCount_e1808855-9a4d-464d-b75a-a41183c520bd.json
new file mode 100644
index 000000000..5f0dca3b3
--- /dev/null
+++ b/services/Network/natGateways/templates/arm/ByteCount_e1808855-9a4d-464d-b75a-a41183c520bd.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of Bytes transmitted within time period",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "300000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ByteCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/natGateways/templates/arm/DatapathAvailability_7cb8821d-c178-4c02-ba8a-1c6fcbcde2e8.json b/services/Network/natGateways/templates/arm/DatapathAvailability_7cb8821d-c178-4c02-ba8a-1c6fcbcde2e8.json
new file mode 100644
index 000000000..7eb3554b0
--- /dev/null
+++ b/services/Network/natGateways/templates/arm/DatapathAvailability_7cb8821d-c178-4c02-ba8a-1c6fcbcde2e8.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "NAT Gateway Datapath Availability",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DatapathAvailability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/natGateways/templates/arm/PacketDropCount_53bb49ec-ed5b-40c3-999b-efefa9be4536.json b/services/Network/natGateways/templates/arm/PacketDropCount_53bb49ec-ed5b-40c3-999b-efefa9be4536.json
new file mode 100644
index 000000000..096085233
--- /dev/null
+++ b/services/Network/natGateways/templates/arm/PacketDropCount_53bb49ec-ed5b-40c3-999b-efefa9be4536.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of dropped packets",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PacketDropCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/natGateways/templates/arm/SNATConnectionCount_4c2e410b-644e-4331-a55c-19bfdc3e4754.json b/services/Network/natGateways/templates/arm/SNATConnectionCount_4c2e410b-644e-4331-a55c-19bfdc3e4754.json
new file mode 100644
index 000000000..0a278b42a
--- /dev/null
+++ b/services/Network/natGateways/templates/arm/SNATConnectionCount_4c2e410b-644e-4331-a55c-19bfdc3e4754.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total concurrent active connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SNATConnectionCount",
+ "dimensions": [{"operator": "include", "name": "connectionstate", "values": ["failed"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/natGateways/templates/arm/TotalConnectionCount_c57f27b1-151c-4d27-a77e-b85547d817f7.json b/services/Network/natGateways/templates/arm/TotalConnectionCount_c57f27b1-151c-4d27-a77e-b85547d817f7.json
new file mode 100644
index 000000000..af8e0258d
--- /dev/null
+++ b/services/Network/natGateways/templates/arm/TotalConnectionCount_c57f27b1-151c-4d27-a77e-b85547d817f7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of active SNAT connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "50000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TotalConnectionCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/natGateways/templates/bicep/ByteCount_e1808855-9a4d-464d-b75a-a41183c520bd.bicep b/services/Network/natGateways/templates/bicep/ByteCount_e1808855-9a4d-464d-b75a-a41183c520bd.bicep
new file mode 100644
index 000000000..0fa4a4687
--- /dev/null
+++ b/services/Network/natGateways/templates/bicep/ByteCount_e1808855-9a4d-464d-b75a-a41183c520bd.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of Bytes transmitted within time period'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 300000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ByteCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/natGateways/templates/bicep/DatapathAvailability_7cb8821d-c178-4c02-ba8a-1c6fcbcde2e8.bicep b/services/Network/natGateways/templates/bicep/DatapathAvailability_7cb8821d-c178-4c02-ba8a-1c6fcbcde2e8.bicep
new file mode 100644
index 000000000..f71d3414d
--- /dev/null
+++ b/services/Network/natGateways/templates/bicep/DatapathAvailability_7cb8821d-c178-4c02-ba8a-1c6fcbcde2e8.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'NAT Gateway Datapath Availability'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DatapathAvailability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/natGateways/templates/bicep/PacketDropCount_53bb49ec-ed5b-40c3-999b-efefa9be4536.bicep b/services/Network/natGateways/templates/bicep/PacketDropCount_53bb49ec-ed5b-40c3-999b-efefa9be4536.bicep
new file mode 100644
index 000000000..06add4e20
--- /dev/null
+++ b/services/Network/natGateways/templates/bicep/PacketDropCount_53bb49ec-ed5b-40c3-999b-efefa9be4536.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of dropped packets'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PacketDropCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/natGateways/templates/bicep/SNATConnectionCount_4c2e410b-644e-4331-a55c-19bfdc3e4754.bicep b/services/Network/natGateways/templates/bicep/SNATConnectionCount_4c2e410b-644e-4331-a55c-19bfdc3e4754.bicep
new file mode 100644
index 000000000..0fed2fb3f
--- /dev/null
+++ b/services/Network/natGateways/templates/bicep/SNATConnectionCount_4c2e410b-644e-4331-a55c-19bfdc3e4754.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total concurrent active connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SNATConnectionCount'
+ dimensions: [
+ {
+ name: 'connectionstate'
+ operator: 'include'
+ values: ['failed']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/natGateways/templates/bicep/TotalConnectionCount_c57f27b1-151c-4d27-a77e-b85547d817f7.bicep b/services/Network/natGateways/templates/bicep/TotalConnectionCount_c57f27b1-151c-4d27-a77e-b85547d817f7.bicep
new file mode 100644
index 000000000..e27141749
--- /dev/null
+++ b/services/Network/natGateways/templates/bicep/TotalConnectionCount_c57f27b1-151c-4d27-a77e-b85547d817f7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of active SNAT connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 50000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TotalConnectionCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/networkSecurityGroups/templates/arm/ActivityLogNSGDelete_4c54dd21-b5ce-4185-aa70-605b167f168f.json b/services/Network/networkSecurityGroups/templates/arm/ActivityLogNSGDelete_4c54dd21-b5ce-4185-aa70-605b167f168f.json
new file mode 100644
index 000000000..da04c21b8
--- /dev/null
+++ b/services/Network/networkSecurityGroups/templates/arm/ActivityLogNSGDelete_4c54dd21-b5ce-4185-aa70-605b167f168f.json
@@ -0,0 +1,95 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Activity Log Alert for NSG Delete",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "Administrative"
+ },
+ {
+ "field": "operationName",
+ "equals": "Microsoft.Network/networkSecurityGroups/delete"
+ },
+ {
+ "field": "status",
+ "containsAny": ["succeeded"]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/networkSecurityGroups/templates/bicep/ActivityLogNSGDelete_4c54dd21-b5ce-4185-aa70-605b167f168f.bicep b/services/Network/networkSecurityGroups/templates/bicep/ActivityLogNSGDelete_4c54dd21-b5ce-4185-aa70-605b167f168f.bicep
new file mode 100644
index 000000000..a47449572
--- /dev/null
+++ b/services/Network/networkSecurityGroups/templates/bicep/ActivityLogNSGDelete_4c54dd21-b5ce-4185-aa70-605b167f168f.bicep
@@ -0,0 +1,68 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Activity Log Alert for NSG Delete'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'Administrative'
+ }
+ {
+ field: 'operationName'
+ equals: 'Microsoft.Network/networkSecurityGroups/delete'
+ }
+ {
+ field: 'status'
+ containsAny: ['succeeded']
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/networkWatchers/templates/arm/connectionMonitors-ChecksFailedPercent_61cbc62a-1382-4581-850f-4ea69d8a9615.json b/services/Network/networkWatchers/templates/arm/connectionMonitors-ChecksFailedPercent_61cbc62a-1382-4581-850f-4ea69d8a9615.json
new file mode 100644
index 000000000..9650df74a
--- /dev/null
+++ b/services/Network/networkWatchers/templates/arm/connectionMonitors-ChecksFailedPercent_61cbc62a-1382-4581-850f-4ea69d8a9615.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "% of connectivity monitoring checks failed",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "50",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ChecksFailedPercent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/networkWatchers/templates/arm/connectionMonitors-ProbesFailedPercent_7659c9f8-c257-4f0b-a8d9-1ceae6177ff5.json b/services/Network/networkWatchers/templates/arm/connectionMonitors-ProbesFailedPercent_7659c9f8-c257-4f0b-a8d9-1ceae6177ff5.json
new file mode 100644
index 000000000..333507991
--- /dev/null
+++ b/services/Network/networkWatchers/templates/arm/connectionMonitors-ProbesFailedPercent_7659c9f8-c257-4f0b-a8d9-1ceae6177ff5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "% of connectivity monitoring probes failed",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ProbesFailedPercent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/networkWatchers/templates/arm/connectionMonitors-RoundTripTimeMs_1744119b-cabb-4ac4-97c6-a61249a6c5be.json b/services/Network/networkWatchers/templates/arm/connectionMonitors-RoundTripTimeMs_1744119b-cabb-4ac4-97c6-a61249a6c5be.json
new file mode 100644
index 000000000..0857adb4e
--- /dev/null
+++ b/services/Network/networkWatchers/templates/arm/connectionMonitors-RoundTripTimeMs_1744119b-cabb-4ac4-97c6-a61249a6c5be.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Round-trip time in milliseconds for the connectivity monitoring checks",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "500",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RoundTripTimeMs",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/networkWatchers/templates/arm/connectionMonitors-TestResult_370ff9a8-11ea-469a-9f52-b1c39d61c39d.json b/services/Network/networkWatchers/templates/arm/connectionMonitors-TestResult_370ff9a8-11ea-469a-9f52-b1c39d61c39d.json
new file mode 100644
index 000000000..57096d73c
--- /dev/null
+++ b/services/Network/networkWatchers/templates/arm/connectionMonitors-TestResult_370ff9a8-11ea-469a-9f52-b1c39d61c39d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Connection monitor test result",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TestResult",
+ "dimensions": [{"operator": "include", "name": "sourcename", "values": ["*"]}, {"operator": "include", "name": "destinationname", "values": ["*"]}, {"operator": "include", "name": "testgroupname", "values": ["*"]}, {"operator": "include", "name": "testconfigurationname", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/networkWatchers/templates/bicep/connectionMonitors-ChecksFailedPercent_61cbc62a-1382-4581-850f-4ea69d8a9615.bicep b/services/Network/networkWatchers/templates/bicep/connectionMonitors-ChecksFailedPercent_61cbc62a-1382-4581-850f-4ea69d8a9615.bicep
new file mode 100644
index 000000000..23144974f
--- /dev/null
+++ b/services/Network/networkWatchers/templates/bicep/connectionMonitors-ChecksFailedPercent_61cbc62a-1382-4581-850f-4ea69d8a9615.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = '% of connectivity monitoring checks failed'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 50
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ChecksFailedPercent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/networkWatchers/templates/bicep/connectionMonitors-ProbesFailedPercent_7659c9f8-c257-4f0b-a8d9-1ceae6177ff5.bicep b/services/Network/networkWatchers/templates/bicep/connectionMonitors-ProbesFailedPercent_7659c9f8-c257-4f0b-a8d9-1ceae6177ff5.bicep
new file mode 100644
index 000000000..b44ce8fd8
--- /dev/null
+++ b/services/Network/networkWatchers/templates/bicep/connectionMonitors-ProbesFailedPercent_7659c9f8-c257-4f0b-a8d9-1ceae6177ff5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = '% of connectivity monitoring probes failed'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ProbesFailedPercent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/networkWatchers/templates/bicep/connectionMonitors-RoundTripTimeMs_1744119b-cabb-4ac4-97c6-a61249a6c5be.bicep b/services/Network/networkWatchers/templates/bicep/connectionMonitors-RoundTripTimeMs_1744119b-cabb-4ac4-97c6-a61249a6c5be.bicep
new file mode 100644
index 000000000..5cffd3a2c
--- /dev/null
+++ b/services/Network/networkWatchers/templates/bicep/connectionMonitors-RoundTripTimeMs_1744119b-cabb-4ac4-97c6-a61249a6c5be.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Round-trip time in milliseconds for the connectivity monitoring checks'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 500
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RoundTripTimeMs'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/networkWatchers/templates/bicep/connectionMonitors-TestResult_370ff9a8-11ea-469a-9f52-b1c39d61c39d.bicep b/services/Network/networkWatchers/templates/bicep/connectionMonitors-TestResult_370ff9a8-11ea-469a-9f52-b1c39d61c39d.bicep
new file mode 100644
index 000000000..36f8f008d
--- /dev/null
+++ b/services/Network/networkWatchers/templates/bicep/connectionMonitors-TestResult_370ff9a8-11ea-469a-9f52-b1c39d61c39d.bicep
@@ -0,0 +1,155 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Connection monitor test result'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TestResult'
+ dimensions: [
+ {
+ name: 'sourcename'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'destinationname'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'testgroupname'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'testconfigurationname'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/privateDnsZones/templates/arm/QueryVolume_4d219611-6487-4fcf-9bac-29cd9e5046a9.json b/services/Network/privateDnsZones/templates/arm/QueryVolume_4d219611-6487-4fcf-9bac-29cd9e5046a9.json
new file mode 100644
index 000000000..80e6a8d4d
--- /dev/null
+++ b/services/Network/privateDnsZones/templates/arm/QueryVolume_4d219611-6487-4fcf-9bac-29cd9e5046a9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of queries served for a Private DNS zone",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "500",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "QueryVolume",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/privateDnsZones/templates/arm/RecordSetCapacityUtilization_95473b2f-74ea-4929-bf22-f6f3be4ccbd5.json b/services/Network/privateDnsZones/templates/arm/RecordSetCapacityUtilization_95473b2f-74ea-4929-bf22-f6f3be4ccbd5.json
new file mode 100644
index 000000000..c7ac762c4
--- /dev/null
+++ b/services/Network/privateDnsZones/templates/arm/RecordSetCapacityUtilization_95473b2f-74ea-4929-bf22-f6f3be4ccbd5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percent of Record Set capacity utilized by a Private DNS zone",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RecordSetCapacityUtilization",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/privateDnsZones/templates/arm/RecordSetCount_b410b69e-8bd5-44fe-899d-f4d5dce9931a.json b/services/Network/privateDnsZones/templates/arm/RecordSetCount_b410b69e-8bd5-44fe-899d-f4d5dce9931a.json
new file mode 100644
index 000000000..044116f1f
--- /dev/null
+++ b/services/Network/privateDnsZones/templates/arm/RecordSetCount_b410b69e-8bd5-44fe-899d-f4d5dce9931a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of Record Sets in a Private DNS zone",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "18750",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RecordSetCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/privateDnsZones/templates/arm/VirtualNetworkLinkCapacityUtilization_e71f87d1-81bb-4ee6-802d-9da4ab1cb3e3.json b/services/Network/privateDnsZones/templates/arm/VirtualNetworkLinkCapacityUtilization_e71f87d1-81bb-4ee6-802d-9da4ab1cb3e3.json
new file mode 100644
index 000000000..c8db97852
--- /dev/null
+++ b/services/Network/privateDnsZones/templates/arm/VirtualNetworkLinkCapacityUtilization_e71f87d1-81bb-4ee6-802d-9da4ab1cb3e3.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percent of Virtual Network Link capacity utilized by a Private DNS zone",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VirtualNetworkLinkCapacityUtilization",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/privateDnsZones/templates/arm/VirtualNetworkWithRegistrationCapacityUtilization_c064753f-ea6a-4940-b603-975adb5127ae.json b/services/Network/privateDnsZones/templates/arm/VirtualNetworkWithRegistrationCapacityUtilization_c064753f-ea6a-4940-b603-975adb5127ae.json
new file mode 100644
index 000000000..7b282d58b
--- /dev/null
+++ b/services/Network/privateDnsZones/templates/arm/VirtualNetworkWithRegistrationCapacityUtilization_c064753f-ea6a-4940-b603-975adb5127ae.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percent of Virtual Network Link with auto-registration capacity utilized by a Private DNS zone",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VirtualNetworkWithRegistrationCapacityUtilization",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/privateDnsZones/templates/bicep/QueryVolume_4d219611-6487-4fcf-9bac-29cd9e5046a9.bicep b/services/Network/privateDnsZones/templates/bicep/QueryVolume_4d219611-6487-4fcf-9bac-29cd9e5046a9.bicep
new file mode 100644
index 000000000..4515a926a
--- /dev/null
+++ b/services/Network/privateDnsZones/templates/bicep/QueryVolume_4d219611-6487-4fcf-9bac-29cd9e5046a9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of queries served for a Private DNS zone'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 500
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'QueryVolume'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/privateDnsZones/templates/bicep/RecordSetCapacityUtilization_95473b2f-74ea-4929-bf22-f6f3be4ccbd5.bicep b/services/Network/privateDnsZones/templates/bicep/RecordSetCapacityUtilization_95473b2f-74ea-4929-bf22-f6f3be4ccbd5.bicep
new file mode 100644
index 000000000..ff1cd8a69
--- /dev/null
+++ b/services/Network/privateDnsZones/templates/bicep/RecordSetCapacityUtilization_95473b2f-74ea-4929-bf22-f6f3be4ccbd5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percent of Record Set capacity utilized by a Private DNS zone'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RecordSetCapacityUtilization'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/privateDnsZones/templates/bicep/RecordSetCount_b410b69e-8bd5-44fe-899d-f4d5dce9931a.bicep b/services/Network/privateDnsZones/templates/bicep/RecordSetCount_b410b69e-8bd5-44fe-899d-f4d5dce9931a.bicep
new file mode 100644
index 000000000..814eb708f
--- /dev/null
+++ b/services/Network/privateDnsZones/templates/bicep/RecordSetCount_b410b69e-8bd5-44fe-899d-f4d5dce9931a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of Record Sets in a Private DNS zone'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 18750
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RecordSetCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/privateDnsZones/templates/bicep/VirtualNetworkLinkCapacityUtilization_e71f87d1-81bb-4ee6-802d-9da4ab1cb3e3.bicep b/services/Network/privateDnsZones/templates/bicep/VirtualNetworkLinkCapacityUtilization_e71f87d1-81bb-4ee6-802d-9da4ab1cb3e3.bicep
new file mode 100644
index 000000000..63a6ef6d9
--- /dev/null
+++ b/services/Network/privateDnsZones/templates/bicep/VirtualNetworkLinkCapacityUtilization_e71f87d1-81bb-4ee6-802d-9da4ab1cb3e3.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percent of Virtual Network Link capacity utilized by a Private DNS zone'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VirtualNetworkLinkCapacityUtilization'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/privateDnsZones/templates/bicep/VirtualNetworkWithRegistrationCapacityUtilization_c064753f-ea6a-4940-b603-975adb5127ae.bicep b/services/Network/privateDnsZones/templates/bicep/VirtualNetworkWithRegistrationCapacityUtilization_c064753f-ea6a-4940-b603-975adb5127ae.bicep
new file mode 100644
index 000000000..79dbe462b
--- /dev/null
+++ b/services/Network/privateDnsZones/templates/bicep/VirtualNetworkWithRegistrationCapacityUtilization_c064753f-ea6a-4940-b603-975adb5127ae.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percent of Virtual Network Link with auto-registration capacity utilized by a Private DNS zone'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VirtualNetworkWithRegistrationCapacityUtilization'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/publicIPAddresses/templates/arm/BytesInDDoS_652acaf1-c5a1-4a88-b3bb-822a14dece19.json b/services/Network/publicIPAddresses/templates/arm/BytesInDDoS_652acaf1-c5a1-4a88-b3bb-822a14dece19.json
new file mode 100644
index 000000000..3991c57b3
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/arm/BytesInDDoS_652acaf1-c5a1-4a88-b3bb-822a14dece19.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for Public IP Address Bytes IN DDOS",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "8000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BytesInDDoS",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/publicIPAddresses/templates/arm/IfUnderDDoSAttack_cb9a5dd7-4ae2-4adf-ab11-95363032ee5d.json b/services/Network/publicIPAddresses/templates/arm/IfUnderDDoSAttack_cb9a5dd7-4ae2-4adf-ab11-95363032ee5d.json
new file mode 100644
index 000000000..2d6346118
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/arm/IfUnderDDoSAttack_cb9a5dd7-4ae2-4adf-ab11-95363032ee5d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for Public IP Address Under Attack",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IfUnderDDoSAttack",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/publicIPAddresses/templates/arm/PacketsInDDoS_a78addf1-4632-4fc2-9afc-d1fb75049872.json b/services/Network/publicIPAddresses/templates/arm/PacketsInDDoS_a78addf1-4632-4fc2-9afc-d1fb75049872.json
new file mode 100644
index 000000000..3de7d2738
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/arm/PacketsInDDoS_a78addf1-4632-4fc2-9afc-d1fb75049872.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Inbound packets DDoS",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "40000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PacketsInDDoS",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/publicIPAddresses/templates/arm/TCPBytesInDDoS_54d85ec1-6c8d-4372-bdab-f6f0b5cc12c4.json b/services/Network/publicIPAddresses/templates/arm/TCPBytesInDDoS_54d85ec1-6c8d-4372-bdab-f6f0b5cc12c4.json
new file mode 100644
index 000000000..817359c4f
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/arm/TCPBytesInDDoS_54d85ec1-6c8d-4372-bdab-f6f0b5cc12c4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Inbound TCP bytes DDoS",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "40000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TCPBytesInDDoS",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/publicIPAddresses/templates/arm/TCPPacketsInDDoS_529b0b1f-46fc-423f-94ab-dd71dd7894e2.json b/services/Network/publicIPAddresses/templates/arm/TCPPacketsInDDoS_529b0b1f-46fc-423f-94ab-dd71dd7894e2.json
new file mode 100644
index 000000000..18ac1f9f6
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/arm/TCPPacketsInDDoS_529b0b1f-46fc-423f-94ab-dd71dd7894e2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Inbound TCP packets DDoS",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "40000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TCPPacketsInDDoS",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/publicIPAddresses/templates/arm/UDPBytesInDDoS_8020f41e-ca61-43b4-88ca-f520057dfa92.json b/services/Network/publicIPAddresses/templates/arm/UDPBytesInDDoS_8020f41e-ca61-43b4-88ca-f520057dfa92.json
new file mode 100644
index 000000000..6eddbac0c
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/arm/UDPBytesInDDoS_8020f41e-ca61-43b4-88ca-f520057dfa92.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Inbound UDP bytes DDoS",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "40000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UDPBytesInDDoS",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/publicIPAddresses/templates/arm/UDPPacketsInDDoS_27181c58-ca7a-433f-a0ee-a7a33102cb36.json b/services/Network/publicIPAddresses/templates/arm/UDPPacketsInDDoS_27181c58-ca7a-433f-a0ee-a7a33102cb36.json
new file mode 100644
index 000000000..8d64ac275
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/arm/UDPPacketsInDDoS_27181c58-ca7a-433f-a0ee-a7a33102cb36.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Inbound UDP packets DDoS",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "40000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UDPPacketsInDDoS",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/publicIPAddresses/templates/arm/VipAvailability_7f4c355a-5411-4400-826a-b82007bbd83d.json b/services/Network/publicIPAddresses/templates/arm/VipAvailability_7f4c355a-5411-4400-826a-b82007bbd83d.json
new file mode 100644
index 000000000..79dacfb10
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/arm/VipAvailability_7f4c355a-5411-4400-826a-b82007bbd83d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average IP Address availability per time duration",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "VipAvailability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/publicIPAddresses/templates/bicep/BytesInDDoS_652acaf1-c5a1-4a88-b3bb-822a14dece19.bicep b/services/Network/publicIPAddresses/templates/bicep/BytesInDDoS_652acaf1-c5a1-4a88-b3bb-822a14dece19.bicep
new file mode 100644
index 000000000..a09353d7b
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/bicep/BytesInDDoS_652acaf1-c5a1-4a88-b3bb-822a14dece19.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for Public IP Address Bytes IN DDOS'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 8000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BytesInDDoS'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/publicIPAddresses/templates/bicep/IfUnderDDoSAttack_cb9a5dd7-4ae2-4adf-ab11-95363032ee5d.bicep b/services/Network/publicIPAddresses/templates/bicep/IfUnderDDoSAttack_cb9a5dd7-4ae2-4adf-ab11-95363032ee5d.bicep
new file mode 100644
index 000000000..46d7a6ea1
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/bicep/IfUnderDDoSAttack_cb9a5dd7-4ae2-4adf-ab11-95363032ee5d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for Public IP Address Under Attack'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IfUnderDDoSAttack'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/publicIPAddresses/templates/bicep/PacketsInDDoS_a78addf1-4632-4fc2-9afc-d1fb75049872.bicep b/services/Network/publicIPAddresses/templates/bicep/PacketsInDDoS_a78addf1-4632-4fc2-9afc-d1fb75049872.bicep
new file mode 100644
index 000000000..512fba0b7
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/bicep/PacketsInDDoS_a78addf1-4632-4fc2-9afc-d1fb75049872.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Inbound packets DDoS'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 40000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PacketsInDDoS'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/publicIPAddresses/templates/bicep/TCPBytesInDDoS_54d85ec1-6c8d-4372-bdab-f6f0b5cc12c4.bicep b/services/Network/publicIPAddresses/templates/bicep/TCPBytesInDDoS_54d85ec1-6c8d-4372-bdab-f6f0b5cc12c4.bicep
new file mode 100644
index 000000000..5c6f8514e
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/bicep/TCPBytesInDDoS_54d85ec1-6c8d-4372-bdab-f6f0b5cc12c4.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Inbound TCP bytes DDoS'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 40000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TCPBytesInDDoS'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/publicIPAddresses/templates/bicep/TCPPacketsInDDoS_529b0b1f-46fc-423f-94ab-dd71dd7894e2.bicep b/services/Network/publicIPAddresses/templates/bicep/TCPPacketsInDDoS_529b0b1f-46fc-423f-94ab-dd71dd7894e2.bicep
new file mode 100644
index 000000000..67aec0946
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/bicep/TCPPacketsInDDoS_529b0b1f-46fc-423f-94ab-dd71dd7894e2.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Inbound TCP packets DDoS'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 40000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TCPPacketsInDDoS'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/publicIPAddresses/templates/bicep/UDPBytesInDDoS_8020f41e-ca61-43b4-88ca-f520057dfa92.bicep b/services/Network/publicIPAddresses/templates/bicep/UDPBytesInDDoS_8020f41e-ca61-43b4-88ca-f520057dfa92.bicep
new file mode 100644
index 000000000..2f7217b95
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/bicep/UDPBytesInDDoS_8020f41e-ca61-43b4-88ca-f520057dfa92.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Inbound UDP bytes DDoS'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 40000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UDPBytesInDDoS'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/publicIPAddresses/templates/bicep/UDPPacketsInDDoS_27181c58-ca7a-433f-a0ee-a7a33102cb36.bicep b/services/Network/publicIPAddresses/templates/bicep/UDPPacketsInDDoS_27181c58-ca7a-433f-a0ee-a7a33102cb36.bicep
new file mode 100644
index 000000000..801bd1496
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/bicep/UDPPacketsInDDoS_27181c58-ca7a-433f-a0ee-a7a33102cb36.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Inbound UDP packets DDoS'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 40000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UDPPacketsInDDoS'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/publicIPAddresses/templates/bicep/VipAvailability_7f4c355a-5411-4400-826a-b82007bbd83d.bicep b/services/Network/publicIPAddresses/templates/bicep/VipAvailability_7f4c355a-5411-4400-826a-b82007bbd83d.bicep
new file mode 100644
index 000000000..4a8cee54c
--- /dev/null
+++ b/services/Network/publicIPAddresses/templates/bicep/VipAvailability_7f4c355a-5411-4400-826a-b82007bbd83d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average IP Address availability per time duration'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'VipAvailability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/routeTables/templates/arm/ActivityLogRouteTableUpdate_6c81eeff-a3a7-4c72-a58e-f2e547ab2799.json b/services/Network/routeTables/templates/arm/ActivityLogRouteTableUpdate_6c81eeff-a3a7-4c72-a58e-f2e547ab2799.json
new file mode 100644
index 000000000..1fdcff558
--- /dev/null
+++ b/services/Network/routeTables/templates/arm/ActivityLogRouteTableUpdate_6c81eeff-a3a7-4c72-a58e-f2e547ab2799.json
@@ -0,0 +1,95 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Activity Log Alert for Route Table Update",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "Administrative"
+ },
+ {
+ "field": "operationName",
+ "equals": "Microsoft.Network/routeTables/routes/write"
+ },
+ {
+ "field": "status",
+ "containsAny": ["succeeded"]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/routeTables/templates/bicep/ActivityLogRouteTableUpdate_6c81eeff-a3a7-4c72-a58e-f2e547ab2799.bicep b/services/Network/routeTables/templates/bicep/ActivityLogRouteTableUpdate_6c81eeff-a3a7-4c72-a58e-f2e547ab2799.bicep
new file mode 100644
index 000000000..e93f61975
--- /dev/null
+++ b/services/Network/routeTables/templates/bicep/ActivityLogRouteTableUpdate_6c81eeff-a3a7-4c72-a58e-f2e547ab2799.bicep
@@ -0,0 +1,68 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Activity Log Alert for Route Table Update'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'Administrative'
+ }
+ {
+ field: 'operationName'
+ equals: 'Microsoft.Network/routeTables/routes/write'
+ }
+ {
+ field: 'status'
+ containsAny: ['succeeded']
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/trafficmanagerprofiles/templates/arm/ProbeAgentCurrentEndpointStateByProfileResourceId_dd3f294f-d12e-4e34-8f6a-c304d3d977e2.json b/services/Network/trafficmanagerprofiles/templates/arm/ProbeAgentCurrentEndpointStateByProfileResourceId_dd3f294f-d12e-4e34-8f6a-c304d3d977e2.json
new file mode 100644
index 000000000..7b6644cf8
--- /dev/null
+++ b/services/Network/trafficmanagerprofiles/templates/arm/ProbeAgentCurrentEndpointStateByProfileResourceId_dd3f294f-d12e-4e34-8f6a-c304d3d977e2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "1 if an endpoint's probe status is "Enabled", 0 otherwise.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ProbeAgentCurrentEndpointStateByProfileResourceId",
+ "dimensions": [{"operator": "include", "name": "endpointname", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/trafficmanagerprofiles/templates/arm/QpsByEndpoint_f4699243-1ba2-49a8-85f8-c4a22a563925.json b/services/Network/trafficmanagerprofiles/templates/arm/QpsByEndpoint_f4699243-1ba2-49a8-85f8-c4a22a563925.json
new file mode 100644
index 000000000..57d76381f
--- /dev/null
+++ b/services/Network/trafficmanagerprofiles/templates/arm/QpsByEndpoint_f4699243-1ba2-49a8-85f8-c4a22a563925.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of times a Traffic Manager endpoint was returned in the given time frame",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "P1D",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "QpsByEndpoint",
+ "dimensions": [{"operator": "include", "name": "endpointname", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/trafficmanagerprofiles/templates/bicep/ProbeAgentCurrentEndpointStateByProfileResourceId_dd3f294f-d12e-4e34-8f6a-c304d3d977e2.bicep b/services/Network/trafficmanagerprofiles/templates/bicep/ProbeAgentCurrentEndpointStateByProfileResourceId_dd3f294f-d12e-4e34-8f6a-c304d3d977e2.bicep
new file mode 100644
index 000000000..a945478d2
--- /dev/null
+++ b/services/Network/trafficmanagerprofiles/templates/bicep/ProbeAgentCurrentEndpointStateByProfileResourceId_dd3f294f-d12e-4e34-8f6a-c304d3d977e2.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = '1 if an endpoint's probe status is "Enabled", 0 otherwise.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ProbeAgentCurrentEndpointStateByProfileResourceId'
+ dimensions: [
+ {
+ name: 'endpointname'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/trafficmanagerprofiles/templates/bicep/QpsByEndpoint_f4699243-1ba2-49a8-85f8-c4a22a563925.bicep b/services/Network/trafficmanagerprofiles/templates/bicep/QpsByEndpoint_f4699243-1ba2-49a8-85f8-c4a22a563925.bicep
new file mode 100644
index 000000000..06043a36c
--- /dev/null
+++ b/services/Network/trafficmanagerprofiles/templates/bicep/QpsByEndpoint_f4699243-1ba2-49a8-85f8-c4a22a563925.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of times a Traffic Manager endpoint was returned in the given time frame'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'P1D'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'QpsByEndpoint'
+ dimensions: [
+ {
+ name: 'endpointname'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworkGateways/templates/arm/AverageBandwidth_88642ff7-6c08-486a-9bf2-37764d5bf6a3.json b/services/Network/virtualNetworkGateways/templates/arm/AverageBandwidth_88642ff7-6c08-486a-9bf2-37764d5bf6a3.json
new file mode 100644
index 000000000..84d924d65
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/arm/AverageBandwidth_88642ff7-6c08-486a-9bf2-37764d5bf6a3.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Site-to-site bandwidth of a gateway in bytes per second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "450000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "AverageBandwidth",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworkGateways/templates/arm/ExpressRouteGatewayBitsPerSecond_4c3c25d2-7473-4d0c-9174-609162571859.json b/services/Network/virtualNetworkGateways/templates/arm/ExpressRouteGatewayBitsPerSecond_4c3c25d2-7473-4d0c-9174-609162571859.json
new file mode 100644
index 000000000..0b69df891
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/arm/ExpressRouteGatewayBitsPerSecond_4c3c25d2-7473-4d0c-9174-609162571859.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VNet Gateway Express Route Bits Per Second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ExpressRouteGatewayBitsPerSecond",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworkGateways/templates/arm/ExpressRouteGatewayCpuUtilization_56491bc7-1267-42a2-92c6-fe9efe822ff1.json b/services/Network/virtualNetworkGateways/templates/arm/ExpressRouteGatewayCpuUtilization_56491bc7-1267-42a2-92c6-fe9efe822ff1.json
new file mode 100644
index 000000000..1cc32df05
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/arm/ExpressRouteGatewayCpuUtilization_56491bc7-1267-42a2-92c6-fe9efe822ff1.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU Utilization of the ExpressRoute Gateway",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ExpressRouteGatewayCpuUtilization",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworkGateways/templates/arm/TunnelAverageBandwidth_09bb7f01-a715-437d-b692-325f89e1869e.json b/services/Network/virtualNetworkGateways/templates/arm/TunnelAverageBandwidth_09bb7f01-a715-437d-b692-325f89e1869e.json
new file mode 100644
index 000000000..1423070a9
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/arm/TunnelAverageBandwidth_09bb7f01-a715-437d-b692-325f89e1869e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average bandwidth of a tunnel in bytes per second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TunnelAverageBandwidth",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworkGateways/templates/arm/TunnelEgressBytes_092f6e09-1eb5-436d-b7c2-eadb70318920.json b/services/Network/virtualNetworkGateways/templates/arm/TunnelEgressBytes_092f6e09-1eb5-436d-b7c2-eadb70318920.json
new file mode 100644
index 000000000..6e5edfde8
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/arm/TunnelEgressBytes_092f6e09-1eb5-436d-b7c2-eadb70318920.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VNet Gateway Tunnel Egress Bytes",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TunnelEgressBytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworkGateways/templates/arm/TunnelEgressPacketDropCount_6f02e3e8-9bfa-4312-a352-6506139e3dba.json b/services/Network/virtualNetworkGateways/templates/arm/TunnelEgressPacketDropCount_6f02e3e8-9bfa-4312-a352-6506139e3dba.json
new file mode 100644
index 000000000..71476092e
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/arm/TunnelEgressPacketDropCount_6f02e3e8-9bfa-4312-a352-6506139e3dba.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for Vnet Gateway tunnel TunnelEgressPacketDropCount",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "TunnelEgressPacketDropCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworkGateways/templates/arm/TunnelEgressPacketDropTSMismatch_ca909c09-89c4-467e-bdca-9140e72d6c82.json b/services/Network/virtualNetworkGateways/templates/arm/TunnelEgressPacketDropTSMismatch_ca909c09-89c4-467e-bdca-9140e72d6c82.json
new file mode 100644
index 000000000..382d9bf09
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/arm/TunnelEgressPacketDropTSMismatch_ca909c09-89c4-467e-bdca-9140e72d6c82.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for Vnet Gateway tunnel TunnelEgressPacketDropTSMismatch",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "TunnelEgressPacketDropTSMismatch",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworkGateways/templates/arm/TunnelIngressBytes_a34fa329-da3e-4947-8d06-9bd2bee6c8a7.json b/services/Network/virtualNetworkGateways/templates/arm/TunnelIngressBytes_a34fa329-da3e-4947-8d06-9bd2bee6c8a7.json
new file mode 100644
index 000000000..3c65ece6b
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/arm/TunnelIngressBytes_a34fa329-da3e-4947-8d06-9bd2bee6c8a7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VNet Gateway Tunnel ingress Bytes",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TunnelIngressBytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworkGateways/templates/arm/TunnelIngressPacketDropCount_b511650f-535c-45d1-a089-0ea402245deb.json b/services/Network/virtualNetworkGateways/templates/arm/TunnelIngressPacketDropCount_b511650f-535c-45d1-a089-0ea402245deb.json
new file mode 100644
index 000000000..a3df2adf1
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/arm/TunnelIngressPacketDropCount_b511650f-535c-45d1-a089-0ea402245deb.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for Vnet Gateway tunnel TunnelIngressPacketDropCount",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "TunnelIngressPacketDropCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworkGateways/templates/arm/TunnelIngressPacketDropTSMismatch_1cc4a539-e4bf-40e8-a280-f4e9e178fb51.json b/services/Network/virtualNetworkGateways/templates/arm/TunnelIngressPacketDropTSMismatch_1cc4a539-e4bf-40e8-a280-f4e9e178fb51.json
new file mode 100644
index 000000000..1aff0df33
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/arm/TunnelIngressPacketDropTSMismatch_1cc4a539-e4bf-40e8-a280-f4e9e178fb51.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for Vnet Gateway tunnel TunnelIngressPacketDropTSMismatch",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "TunnelIngressPacketDropTSMismatch",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworkGateways/templates/bicep/AverageBandwidth_88642ff7-6c08-486a-9bf2-37764d5bf6a3.bicep b/services/Network/virtualNetworkGateways/templates/bicep/AverageBandwidth_88642ff7-6c08-486a-9bf2-37764d5bf6a3.bicep
new file mode 100644
index 000000000..e5eabfe09
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/bicep/AverageBandwidth_88642ff7-6c08-486a-9bf2-37764d5bf6a3.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Site-to-site bandwidth of a gateway in bytes per second'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 450000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'AverageBandwidth'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworkGateways/templates/bicep/ExpressRouteGatewayBitsPerSecond_4c3c25d2-7473-4d0c-9174-609162571859.bicep b/services/Network/virtualNetworkGateways/templates/bicep/ExpressRouteGatewayBitsPerSecond_4c3c25d2-7473-4d0c-9174-609162571859.bicep
new file mode 100644
index 000000000..84f655472
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/bicep/ExpressRouteGatewayBitsPerSecond_4c3c25d2-7473-4d0c-9174-609162571859.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VNet Gateway Express Route Bits Per Second'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ExpressRouteGatewayBitsPerSecond'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworkGateways/templates/bicep/ExpressRouteGatewayCpuUtilization_56491bc7-1267-42a2-92c6-fe9efe822ff1.bicep b/services/Network/virtualNetworkGateways/templates/bicep/ExpressRouteGatewayCpuUtilization_56491bc7-1267-42a2-92c6-fe9efe822ff1.bicep
new file mode 100644
index 000000000..0249b7633
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/bicep/ExpressRouteGatewayCpuUtilization_56491bc7-1267-42a2-92c6-fe9efe822ff1.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU Utilization of the ExpressRoute Gateway'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ExpressRouteGatewayCpuUtilization'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworkGateways/templates/bicep/TunnelAverageBandwidth_09bb7f01-a715-437d-b692-325f89e1869e.bicep b/services/Network/virtualNetworkGateways/templates/bicep/TunnelAverageBandwidth_09bb7f01-a715-437d-b692-325f89e1869e.bicep
new file mode 100644
index 000000000..fd7bd71d0
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/bicep/TunnelAverageBandwidth_09bb7f01-a715-437d-b692-325f89e1869e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average bandwidth of a tunnel in bytes per second'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TunnelAverageBandwidth'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworkGateways/templates/bicep/TunnelEgressBytes_092f6e09-1eb5-436d-b7c2-eadb70318920.bicep b/services/Network/virtualNetworkGateways/templates/bicep/TunnelEgressBytes_092f6e09-1eb5-436d-b7c2-eadb70318920.bicep
new file mode 100644
index 000000000..2f32a7bd4
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/bicep/TunnelEgressBytes_092f6e09-1eb5-436d-b7c2-eadb70318920.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VNet Gateway Tunnel Egress Bytes'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TunnelEgressBytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworkGateways/templates/bicep/TunnelEgressPacketDropCount_6f02e3e8-9bfa-4312-a352-6506139e3dba.bicep b/services/Network/virtualNetworkGateways/templates/bicep/TunnelEgressPacketDropCount_6f02e3e8-9bfa-4312-a352-6506139e3dba.bicep
new file mode 100644
index 000000000..bfc390276
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/bicep/TunnelEgressPacketDropCount_6f02e3e8-9bfa-4312-a352-6506139e3dba.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for Vnet Gateway tunnel TunnelEgressPacketDropCount'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'TunnelEgressPacketDropCount'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworkGateways/templates/bicep/TunnelEgressPacketDropTSMismatch_ca909c09-89c4-467e-bdca-9140e72d6c82.bicep b/services/Network/virtualNetworkGateways/templates/bicep/TunnelEgressPacketDropTSMismatch_ca909c09-89c4-467e-bdca-9140e72d6c82.bicep
new file mode 100644
index 000000000..85d72c210
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/bicep/TunnelEgressPacketDropTSMismatch_ca909c09-89c4-467e-bdca-9140e72d6c82.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for Vnet Gateway tunnel TunnelEgressPacketDropTSMismatch'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'TunnelEgressPacketDropTSMismatch'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworkGateways/templates/bicep/TunnelIngressBytes_a34fa329-da3e-4947-8d06-9bd2bee6c8a7.bicep b/services/Network/virtualNetworkGateways/templates/bicep/TunnelIngressBytes_a34fa329-da3e-4947-8d06-9bd2bee6c8a7.bicep
new file mode 100644
index 000000000..c5dbc8b56
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/bicep/TunnelIngressBytes_a34fa329-da3e-4947-8d06-9bd2bee6c8a7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VNet Gateway Tunnel ingress Bytes'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TunnelIngressBytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworkGateways/templates/bicep/TunnelIngressPacketDropCount_b511650f-535c-45d1-a089-0ea402245deb.bicep b/services/Network/virtualNetworkGateways/templates/bicep/TunnelIngressPacketDropCount_b511650f-535c-45d1-a089-0ea402245deb.bicep
new file mode 100644
index 000000000..04c6b5b40
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/bicep/TunnelIngressPacketDropCount_b511650f-535c-45d1-a089-0ea402245deb.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for Vnet Gateway tunnel TunnelIngressPacketDropCount'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'TunnelIngressPacketDropCount'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworkGateways/templates/bicep/TunnelIngressPacketDropTSMismatch_1cc4a539-e4bf-40e8-a280-f4e9e178fb51.bicep b/services/Network/virtualNetworkGateways/templates/bicep/TunnelIngressPacketDropTSMismatch_1cc4a539-e4bf-40e8-a280-f4e9e178fb51.bicep
new file mode 100644
index 000000000..0ae80a7a6
--- /dev/null
+++ b/services/Network/virtualNetworkGateways/templates/bicep/TunnelIngressPacketDropTSMismatch_1cc4a539-e4bf-40e8-a280-f4e9e178fb51.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for Vnet Gateway tunnel TunnelIngressPacketDropTSMismatch'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'TunnelIngressPacketDropTSMismatch'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/virtualNetworks/templates/arm/IfUnderDDoSAttack_72dea6f4-858c-423f-8189-406aac7d20ac.json b/services/Network/virtualNetworks/templates/arm/IfUnderDDoSAttack_72dea6f4-858c-423f-8189-406aac7d20ac.json
new file mode 100644
index 000000000..8d1811338
--- /dev/null
+++ b/services/Network/virtualNetworks/templates/arm/IfUnderDDoSAttack_72dea6f4-858c-423f-8189-406aac7d20ac.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VNet DDOS Attack",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IfUnderDDoSAttack",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/virtualNetworks/templates/bicep/IfUnderDDoSAttack_72dea6f4-858c-423f-8189-406aac7d20ac.bicep b/services/Network/virtualNetworks/templates/bicep/IfUnderDDoSAttack_72dea6f4-858c-423f-8189-406aac7d20ac.bicep
new file mode 100644
index 000000000..6b38554de
--- /dev/null
+++ b/services/Network/virtualNetworks/templates/bicep/IfUnderDDoSAttack_72dea6f4-858c-423f-8189-406aac7d20ac.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VNet DDOS Attack'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IfUnderDDoSAttack'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/vpnGateways/templates/arm/ActivityLogVPNGatewayDelete_50c8313a-bbe7-4981-8eee-4b4d44fda37f.json b/services/Network/vpnGateways/templates/arm/ActivityLogVPNGatewayDelete_50c8313a-bbe7-4981-8eee-4b4d44fda37f.json
new file mode 100644
index 000000000..130cb4986
--- /dev/null
+++ b/services/Network/vpnGateways/templates/arm/ActivityLogVPNGatewayDelete_50c8313a-bbe7-4981-8eee-4b4d44fda37f.json
@@ -0,0 +1,95 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Activity Log Alert for VPN Gateway Delete",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "Administrative"
+ },
+ {
+ "field": "operationName",
+ "equals": "Microsoft.Network/vpnGateways/delete"
+ },
+ {
+ "field": "status",
+ "containsAny": ["succeeded"]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/vpnGateways/templates/arm/BGPPeerStatus_b0ea832c-aae8-42c0-ad83-0bb13d66d56e.json b/services/Network/vpnGateways/templates/arm/BGPPeerStatus_b0ea832c-aae8-42c0-ad83-0bb13d66d56e.json
new file mode 100644
index 000000000..09043ea6f
--- /dev/null
+++ b/services/Network/vpnGateways/templates/arm/BGPPeerStatus_b0ea832c-aae8-42c0-ad83-0bb13d66d56e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VPN Gateway BGP peer status",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BgpPeerStatus",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/vpnGateways/templates/arm/TunnelAverageBandwidth_d74fd111-125f-45b8-8bbc-e23bd40aa869.json b/services/Network/vpnGateways/templates/arm/TunnelAverageBandwidth_d74fd111-125f-45b8-8bbc-e23bd40aa869.json
new file mode 100644
index 000000000..ed4d1ffd1
--- /dev/null
+++ b/services/Network/vpnGateways/templates/arm/TunnelAverageBandwidth_d74fd111-125f-45b8-8bbc-e23bd40aa869.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VPN Gateway Bandwidth Utilization",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TunnelAverageBandwidth",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/vpnGateways/templates/arm/TunnelEgressBytes_cd3b834d-f34f-4a67-af01-b1c5d32195a9.json b/services/Network/vpnGateways/templates/arm/TunnelEgressBytes_cd3b834d-f34f-4a67-af01-b1c5d32195a9.json
new file mode 100644
index 000000000..981ad38b0
--- /dev/null
+++ b/services/Network/vpnGateways/templates/arm/TunnelEgressBytes_cd3b834d-f34f-4a67-af01-b1c5d32195a9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VPN Gateway tunnel egress bytes",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TunnelEgressBytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/vpnGateways/templates/arm/TunnelEgressPacketDropCount_c5ae6d80-59db-4087-8e9b-0df36c54ebe9.json b/services/Network/vpnGateways/templates/arm/TunnelEgressPacketDropCount_c5ae6d80-59db-4087-8e9b-0df36c54ebe9.json
new file mode 100644
index 000000000..c4571d8a3
--- /dev/null
+++ b/services/Network/vpnGateways/templates/arm/TunnelEgressPacketDropCount_c5ae6d80-59db-4087-8e9b-0df36c54ebe9.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VPN Gateway tunnel TunnelEgressPacketDropCount",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "TunnelEgressPacketDropCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/vpnGateways/templates/arm/TunnelEgressPacketDropTSMismatch_7b361791-127e-4a6f-9c1b-c8d9f41ec223.json b/services/Network/vpnGateways/templates/arm/TunnelEgressPacketDropTSMismatch_7b361791-127e-4a6f-9c1b-c8d9f41ec223.json
new file mode 100644
index 000000000..810a50f5c
--- /dev/null
+++ b/services/Network/vpnGateways/templates/arm/TunnelEgressPacketDropTSMismatch_7b361791-127e-4a6f-9c1b-c8d9f41ec223.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VPN Gateway tunnel TunnelEgressPacketDropTSMismatch",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "TunnelEgressPacketDropTSMismatch",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/vpnGateways/templates/arm/TunnelIngressBytes_a05d97b8-37b9-4100-a860-d57363aaaf5f.json b/services/Network/vpnGateways/templates/arm/TunnelIngressBytes_a05d97b8-37b9-4100-a860-d57363aaaf5f.json
new file mode 100644
index 000000000..9ef07aab9
--- /dev/null
+++ b/services/Network/vpnGateways/templates/arm/TunnelIngressBytes_a05d97b8-37b9-4100-a860-d57363aaaf5f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VPN Gateway TunnelIngressBytes",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TunnelIngressBytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/vpnGateways/templates/arm/TunnelIngressPacketDropCount_c2c9a09d-7fad-4c67-9a29-4c2c376a7214.json b/services/Network/vpnGateways/templates/arm/TunnelIngressPacketDropCount_c2c9a09d-7fad-4c67-9a29-4c2c376a7214.json
new file mode 100644
index 000000000..5cc928a4c
--- /dev/null
+++ b/services/Network/vpnGateways/templates/arm/TunnelIngressPacketDropCount_c2c9a09d-7fad-4c67-9a29-4c2c376a7214.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for VPN Gateway tunnel TunnelIngressPacketDropCount",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "TunnelIngressPacketDropCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/vpnGateways/templates/arm/TunnelIngressPacketDropTSMismatch_7affb4da-2058-4f12-b15b-ca58e92b63e5.json b/services/Network/vpnGateways/templates/arm/TunnelIngressPacketDropTSMismatch_7affb4da-2058-4f12-b15b-ca58e92b63e5.json
new file mode 100644
index 000000000..1aff0df33
--- /dev/null
+++ b/services/Network/vpnGateways/templates/arm/TunnelIngressPacketDropTSMismatch_7affb4da-2058-4f12-b15b-ca58e92b63e5.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric Alert for Vnet Gateway tunnel TunnelIngressPacketDropTSMismatch",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "TunnelIngressPacketDropTSMismatch",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Network/vpnGateways/templates/bicep/ActivityLogVPNGatewayDelete_50c8313a-bbe7-4981-8eee-4b4d44fda37f.bicep b/services/Network/vpnGateways/templates/bicep/ActivityLogVPNGatewayDelete_50c8313a-bbe7-4981-8eee-4b4d44fda37f.bicep
new file mode 100644
index 000000000..6ff486a60
--- /dev/null
+++ b/services/Network/vpnGateways/templates/bicep/ActivityLogVPNGatewayDelete_50c8313a-bbe7-4981-8eee-4b4d44fda37f.bicep
@@ -0,0 +1,68 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Activity Log Alert for VPN Gateway Delete'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'Administrative'
+ }
+ {
+ field: 'operationName'
+ equals: 'Microsoft.Network/vpnGateways/delete'
+ }
+ {
+ field: 'status'
+ containsAny: ['succeeded']
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/vpnGateways/templates/bicep/BGPPeerStatus_b0ea832c-aae8-42c0-ad83-0bb13d66d56e.bicep b/services/Network/vpnGateways/templates/bicep/BGPPeerStatus_b0ea832c-aae8-42c0-ad83-0bb13d66d56e.bicep
new file mode 100644
index 000000000..f1d4f0c4b
--- /dev/null
+++ b/services/Network/vpnGateways/templates/bicep/BGPPeerStatus_b0ea832c-aae8-42c0-ad83-0bb13d66d56e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VPN Gateway BGP peer status'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BgpPeerStatus'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/vpnGateways/templates/bicep/TunnelAverageBandwidth_d74fd111-125f-45b8-8bbc-e23bd40aa869.bicep b/services/Network/vpnGateways/templates/bicep/TunnelAverageBandwidth_d74fd111-125f-45b8-8bbc-e23bd40aa869.bicep
new file mode 100644
index 000000000..5e1f00e67
--- /dev/null
+++ b/services/Network/vpnGateways/templates/bicep/TunnelAverageBandwidth_d74fd111-125f-45b8-8bbc-e23bd40aa869.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VPN Gateway Bandwidth Utilization'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TunnelAverageBandwidth'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/vpnGateways/templates/bicep/TunnelEgressBytes_cd3b834d-f34f-4a67-af01-b1c5d32195a9.bicep b/services/Network/vpnGateways/templates/bicep/TunnelEgressBytes_cd3b834d-f34f-4a67-af01-b1c5d32195a9.bicep
new file mode 100644
index 000000000..fe858c530
--- /dev/null
+++ b/services/Network/vpnGateways/templates/bicep/TunnelEgressBytes_cd3b834d-f34f-4a67-af01-b1c5d32195a9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VPN Gateway tunnel egress bytes'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TunnelEgressBytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/vpnGateways/templates/bicep/TunnelEgressPacketDropCount_c5ae6d80-59db-4087-8e9b-0df36c54ebe9.bicep b/services/Network/vpnGateways/templates/bicep/TunnelEgressPacketDropCount_c5ae6d80-59db-4087-8e9b-0df36c54ebe9.bicep
new file mode 100644
index 000000000..85d33fec6
--- /dev/null
+++ b/services/Network/vpnGateways/templates/bicep/TunnelEgressPacketDropCount_c5ae6d80-59db-4087-8e9b-0df36c54ebe9.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VPN Gateway tunnel TunnelEgressPacketDropCount'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'TunnelEgressPacketDropCount'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/vpnGateways/templates/bicep/TunnelEgressPacketDropTSMismatch_7b361791-127e-4a6f-9c1b-c8d9f41ec223.bicep b/services/Network/vpnGateways/templates/bicep/TunnelEgressPacketDropTSMismatch_7b361791-127e-4a6f-9c1b-c8d9f41ec223.bicep
new file mode 100644
index 000000000..31015a0a7
--- /dev/null
+++ b/services/Network/vpnGateways/templates/bicep/TunnelEgressPacketDropTSMismatch_7b361791-127e-4a6f-9c1b-c8d9f41ec223.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VPN Gateway tunnel TunnelEgressPacketDropTSMismatch'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'TunnelEgressPacketDropTSMismatch'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/vpnGateways/templates/bicep/TunnelIngressBytes_a05d97b8-37b9-4100-a860-d57363aaaf5f.bicep b/services/Network/vpnGateways/templates/bicep/TunnelIngressBytes_a05d97b8-37b9-4100-a860-d57363aaaf5f.bicep
new file mode 100644
index 000000000..2f08bfddf
--- /dev/null
+++ b/services/Network/vpnGateways/templates/bicep/TunnelIngressBytes_a05d97b8-37b9-4100-a860-d57363aaaf5f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VPN Gateway TunnelIngressBytes'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TunnelIngressBytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/vpnGateways/templates/bicep/TunnelIngressPacketDropCount_c2c9a09d-7fad-4c67-9a29-4c2c376a7214.bicep b/services/Network/vpnGateways/templates/bicep/TunnelIngressPacketDropCount_c2c9a09d-7fad-4c67-9a29-4c2c376a7214.bicep
new file mode 100644
index 000000000..270f1d3f4
--- /dev/null
+++ b/services/Network/vpnGateways/templates/bicep/TunnelIngressPacketDropCount_c2c9a09d-7fad-4c67-9a29-4c2c376a7214.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for VPN Gateway tunnel TunnelIngressPacketDropCount'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'TunnelIngressPacketDropCount'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Network/vpnGateways/templates/bicep/TunnelIngressPacketDropTSMismatch_7affb4da-2058-4f12-b15b-ca58e92b63e5.bicep b/services/Network/vpnGateways/templates/bicep/TunnelIngressPacketDropTSMismatch_7affb4da-2058-4f12-b15b-ca58e92b63e5.bicep
new file mode 100644
index 000000000..0ae80a7a6
--- /dev/null
+++ b/services/Network/vpnGateways/templates/bicep/TunnelIngressPacketDropTSMismatch_7affb4da-2058-4f12-b15b-ca58e92b63e5.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric Alert for Vnet Gateway tunnel TunnelIngressPacketDropTSMismatch'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'TunnelIngressPacketDropTSMismatch'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/ActivityLogLAWorkspaceDelete_63cdfaa7-f029-4c4b-8f34-fff71fe401af.json b/services/OperationalInsights/workspaces/templates/arm/ActivityLogLAWorkspaceDelete_63cdfaa7-f029-4c4b-8f34-fff71fe401af.json
new file mode 100644
index 000000000..fd4709dcb
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/ActivityLogLAWorkspaceDelete_63cdfaa7-f029-4c4b-8f34-fff71fe401af.json
@@ -0,0 +1,95 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Activity Log LA Workspace Delete",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "Administrative"
+ },
+ {
+ "field": "operationName",
+ "equals": "Microsoft.OperationalInsights/workspaces/delete"
+ },
+ {
+ "field": "status",
+ "containsAny": ["succeeded"]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/ActivityLogLAWorkspaceRegenerateKey_04a98577-458a-4a5d-88b2-22b2d140f9f3.json b/services/OperationalInsights/workspaces/templates/arm/ActivityLogLAWorkspaceRegenerateKey_04a98577-458a-4a5d-88b2-22b2d140f9f3.json
new file mode 100644
index 000000000..556864bed
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/ActivityLogLAWorkspaceRegenerateKey_04a98577-458a-4a5d-88b2-22b2d140f9f3.json
@@ -0,0 +1,95 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Activity Log Alert for LA Workspace Regenerate Key",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "Administrative"
+ },
+ {
+ "field": "operationName",
+ "equals": "Microsoft.OperationalInsights/workspaces/regeneratesharedkey/action"
+ },
+ {
+ "field": "status",
+ "containsAny": ["succeeded"]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageAvailableMBytesMemory_99ba0b14-4b3c-49b5-8763-3161b9aae538.json b/services/OperationalInsights/workspaces/templates/arm/AverageAvailableMBytesMemory_99ba0b14-4b3c-49b5-8763-3161b9aae538.json
new file mode 100644
index 000000000..9b6f1bd35
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageAvailableMBytesMemory_99ba0b14-4b3c-49b5-8763-3161b9aae538.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Available MBytes Memory. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_Available MBytes Memory",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageAvailableMBytes_b0c5e86f-eb2d-41ea-a4a0-9819ad841c70.json b/services/OperationalInsights/workspaces/templates/arm/AverageAvailableMBytes_b0c5e86f-eb2d-41ea-a4a0-9819ad841c70.json
new file mode 100644
index 000000000..c72430a5f
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageAvailableMBytes_b0c5e86f-eb2d-41ea-a4a0-9819ad841c70.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Available MBytes. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "512",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_Available MBytes",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageAvailableMemory_91044c16-83bc-457f-80a9-360bad5dedb4.json b/services/OperationalInsights/workspaces/templates/arm/AverageAvailableMemory_91044c16-83bc-457f-80a9-360bad5dedb4.json
new file mode 100644
index 000000000..da5dfd1a9
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageAvailableMemory_91044c16-83bc-457f-80a9-360bad5dedb4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% Available Memory. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% Available Memory",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageAvgDisksecRead_8b472051-ff68-4059-9e50-243bfb64bae4.json b/services/OperationalInsights/workspaces/templates/arm/AverageAvgDisksecRead_8b472051-ff68-4059-9e50-243bfb64bae4.json
new file mode 100644
index 000000000..71d2eccf5
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageAvgDisksecRead_8b472051-ff68-4059-9e50-243bfb64bae4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Avg. Disk sec/Read. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_Avg. Disk sec/Read",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "objectname", "values": ["logicaldisk"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageAvgDisksecWrite_aad0e64e-3cda-45bf-b6bd-8cff29ee35e5.json b/services/OperationalInsights/workspaces/templates/arm/AverageAvgDisksecWrite_aad0e64e-3cda-45bf-b6bd-8cff29ee35e5.json
new file mode 100644
index 000000000..1aac931ed
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageAvgDisksecWrite_aad0e64e-3cda-45bf-b6bd-8cff29ee35e5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Avg. Disk sec/Write. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_Avg. Disk sec/Write",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "objectname", "values": ["logicaldisk"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageBytesReceivedsec_60ec2790-dc83-419c-bdb5-38da9a477c68.json b/services/OperationalInsights/workspaces/templates/arm/AverageBytesReceivedsec_60ec2790-dc83-419c-bdb5-38da9a477c68.json
new file mode 100644
index 000000000..5d6a7acae
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageBytesReceivedsec_60ec2790-dc83-419c-bdb5-38da9a477c68.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Bytes Received/sec. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterOrLessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 3,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "Average_Bytes Received/sec",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "objectname", "values": ["*"]}, {"operator": "include", "name": "instancename", "values": ["*"]}, {"operator": "include", "name": "sourcesystem", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageBytesSentsec_de6d5087-bc5a-474f-9319-248a3c03ab44.json b/services/OperationalInsights/workspaces/templates/arm/AverageBytesSentsec_de6d5087-bc5a-474f-9319-248a3c03ab44.json
new file mode 100644
index 000000000..ff198b5bc
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageBytesSentsec_de6d5087-bc5a-474f-9319-248a3c03ab44.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Bytes Sent/sec. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterOrLessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 3,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "Average_Bytes Sent/sec",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "objectname", "values": ["*"]}, {"operator": "include", "name": "instancename", "values": ["*"]}, {"operator": "include", "name": "sourcesystem", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageCommittedBytesInUse_a70e406c-a0ae-4e0f-99cd-8b0836812c59.json b/services/OperationalInsights/workspaces/templates/arm/AverageCommittedBytesInUse_a70e406c-a0ae-4e0f-99cd-8b0836812c59.json
new file mode 100644
index 000000000..5b5989407
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageCommittedBytesInUse_a70e406c-a0ae-4e0f-99cd-8b0836812c59.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% Committed Bytes In Use. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% Committed Bytes In Use",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageCurrentDiskQueueLength_08a4f049-9bb8-45d0-9dfb-320f385cc71f.json b/services/OperationalInsights/workspaces/templates/arm/AverageCurrentDiskQueueLength_08a4f049-9bb8-45d0-9dfb-320f385cc71f.json
new file mode 100644
index 000000000..eba405e90
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageCurrentDiskQueueLength_08a4f049-9bb8-45d0-9dfb-320f385cc71f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Current Disk Queue Length. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_Current Disk Queue Length",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "objectname", "values": ["*"]}, {"operator": "include", "name": "instancename", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageDiskTransferssec_30b462dd-d026-4122-9bcf-3a114517e04c.json b/services/OperationalInsights/workspaces/templates/arm/AverageDiskTransferssec_30b462dd-d026-4122-9bcf-3a114517e04c.json
new file mode 100644
index 000000000..3f6a03741
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageDiskTransferssec_30b462dd-d026-4122-9bcf-3a114517e04c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Disk Transfers/sec. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_Disk Transfers/sec",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageFreeMegabytes_969677fe-d1e0-42f6-92af-c9269780411b.json b/services/OperationalInsights/workspaces/templates/arm/AverageFreeMegabytes_969677fe-d1e0-42f6-92af-c9269780411b.json
new file mode 100644
index 000000000..3e15612f4
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageFreeMegabytes_969677fe-d1e0-42f6-92af-c9269780411b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Free Megabytes. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10240",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_Free Megabytes",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "instancename", "values": ["c:", "/"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageFreeSpace_db621663-ec0a-4fa3-82a7-b6b110726568.json b/services/OperationalInsights/workspaces/templates/arm/AverageFreeSpace_db621663-ec0a-4fa3-82a7-b6b110726568.json
new file mode 100644
index 000000000..9b06c6231
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageFreeSpace_db621663-ec0a-4fa3-82a7-b6b110726568.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% Free Space. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% Free Space",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageIOWaitTime_1116a5eb-9e12-415a-af46-fad552421d36.json b/services/OperationalInsights/workspaces/templates/arm/AverageIOWaitTime_1116a5eb-9e12-415a-af46-fad552421d36.json
new file mode 100644
index 000000000..f87af9f36
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageIOWaitTime_1116a5eb-9e12-415a-af46-fad552421d36.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% IO Wait Time. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% IO Wait Time",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["vm-prd-dmzout-k8snodes-001"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageIdleTime_732c0a7b-ac17-47cb-bf78-2ebaa839fa0d.json b/services/OperationalInsights/workspaces/templates/arm/AverageIdleTime_732c0a7b-ac17-47cb-bf78-2ebaa839fa0d.json
new file mode 100644
index 000000000..a6dc6695b
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageIdleTime_732c0a7b-ac17-47cb-bf78-2ebaa839fa0d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% Idle Time. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "20",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% Idle Time",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "objectname", "values": ["logicaldisk"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AveragePagessec_88b7198b-32a5-4ae2-aaa5-7925066cc08c.json b/services/OperationalInsights/workspaces/templates/arm/AveragePagessec_88b7198b-32a5-4ae2-aaa5-7925066cc08c.json
new file mode 100644
index 000000000..d15e4a9e4
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AveragePagessec_88b7198b-32a5-4ae2-aaa5-7925066cc08c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Pages/sec. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_Pages/sec",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "objectname", "values": ["memory"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageProcessorTime_0c416177-e7ce-40d5-8f15-8566b3d7c03c.json b/services/OperationalInsights/workspaces/templates/arm/AverageProcessorTime_0c416177-e7ce-40d5-8f15-8566b3d7c03c.json
new file mode 100644
index 000000000..607be0d3a
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageProcessorTime_0c416177-e7ce-40d5-8f15-8566b3d7c03c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% Processor Time. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% Processor Time",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageTotalBytesReceived_593b6885-3fb8-4562-89f1-8b0b68649185.json b/services/OperationalInsights/workspaces/templates/arm/AverageTotalBytesReceived_593b6885-3fb8-4562-89f1-8b0b68649185.json
new file mode 100644
index 000000000..0b5482352
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageTotalBytesReceived_593b6885-3fb8-4562-89f1-8b0b68649185.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Total Bytes Received. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterOrLessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 3,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "Average_Total Bytes Received",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "objectname", "values": ["*"]}, {"operator": "include", "name": "instancename", "values": ["*"]}, {"operator": "include", "name": "sourcesystem", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageTotalBytesTransmitted_76583e85-8be6-4d02-8e09-aff0ce8574f8.json b/services/OperationalInsights/workspaces/templates/arm/AverageTotalBytesTransmitted_76583e85-8be6-4d02-8e09-aff0ce8574f8.json
new file mode 100644
index 000000000..d4fd7878c
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageTotalBytesTransmitted_76583e85-8be6-4d02-8e09-aff0ce8574f8.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_Total Bytes Transmitted. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterOrLessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 3,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "Average_Total Bytes Transmitted",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "objectname", "values": ["*"]}, {"operator": "include", "name": "instancename", "values": ["*"]}, {"operator": "include", "name": "sourcesystem", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageUsedInodes_af5d055f-0e1f-4c48-808a-d21f8268357d.json b/services/OperationalInsights/workspaces/templates/arm/AverageUsedInodes_af5d055f-0e1f-4c48-808a-d21f8268357d.json
new file mode 100644
index 000000000..2e7c92bd8
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageUsedInodes_af5d055f-0e1f-4c48-808a-d21f8268357d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% Used Inodes. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% Used Inodes",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageUsedMemory_171e5b5c-78cc-44a1-b7fb-7d750914ed5e.json b/services/OperationalInsights/workspaces/templates/arm/AverageUsedMemory_171e5b5c-78cc-44a1-b7fb-7d750914ed5e.json
new file mode 100644
index 000000000..9d0855e92
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageUsedMemory_171e5b5c-78cc-44a1-b7fb-7d750914ed5e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% Used Memory. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% Used Memory",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageUsedSpace_49ba0df7-18bf-4b3e-9d0f-f8c055762fd5.json b/services/OperationalInsights/workspaces/templates/arm/AverageUsedSpace_49ba0df7-18bf-4b3e-9d0f-f8c055762fd5.json
new file mode 100644
index 000000000..0d6a0377c
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageUsedSpace_49ba0df7-18bf-4b3e-9d0f-f8c055762fd5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% Used Space. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% Used Space",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageUsedSwapSpace_04f64694-48a2-48ee-9455-ccce8e59b66f.json b/services/OperationalInsights/workspaces/templates/arm/AverageUsedSwapSpace_04f64694-48a2-48ee-9455-ccce8e59b66f.json
new file mode 100644
index 000000000..2aa014e27
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageUsedSwapSpace_04f64694-48a2-48ee-9455-ccce8e59b66f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% Used Swap Space. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "50",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% Used Swap Space",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "objectname", "values": ["*"]}, {"operator": "include", "name": "instancename", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/AverageUserTime_b8140cdb-5492-4177-881f-8668372947a8.json b/services/OperationalInsights/workspaces/templates/arm/AverageUserTime_b8140cdb-5492-4177-881f-8668372947a8.json
new file mode 100644
index 000000000..39c3430ea
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/AverageUserTime_b8140cdb-5492-4177-881f-8668372947a8.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average_% User Time. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Average_% User Time",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["vm-prd-dmzout-k8snodes-001"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/Event_0b608189-b028-4851-8854-9ce1a48c3dd6.json b/services/OperationalInsights/workspaces/templates/arm/Event_0b608189-b028-4851-8854-9ce1a48c3dd6.json
new file mode 100644
index 000000000..89c28d3d5
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/Event_0b608189-b028-4851-8854-9ce1a48c3dd6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Event. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Event",
+ "dimensions": [{"operator": "include", "name": "source", "values": ["service control manager"]}, {"operator": "include", "name": "eventlog", "values": ["system"]}, {"operator": "include", "name": "computer", "values": ["*"]}, {"operator": "include", "name": "eventid", "values": ["7031", "7024", "7034"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/arm/Heartbeat_83703f70-9ea8-44aa-b88a-a8e56eb42858.json b/services/OperationalInsights/workspaces/templates/arm/Heartbeat_83703f70-9ea8-44aa-b88a-a8e56eb42858.json
new file mode 100644
index 000000000..df8cff122
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/arm/Heartbeat_83703f70-9ea8-44aa-b88a-a8e56eb42858.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Heartbeat. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Heartbeat",
+ "dimensions": [{"operator": "include", "name": "computer", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/ActivityLogLAWorkspaceDelete_63cdfaa7-f029-4c4b-8f34-fff71fe401af.bicep b/services/OperationalInsights/workspaces/templates/bicep/ActivityLogLAWorkspaceDelete_63cdfaa7-f029-4c4b-8f34-fff71fe401af.bicep
new file mode 100644
index 000000000..b4e2324c6
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/ActivityLogLAWorkspaceDelete_63cdfaa7-f029-4c4b-8f34-fff71fe401af.bicep
@@ -0,0 +1,68 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Activity Log LA Workspace Delete'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'Administrative'
+ }
+ {
+ field: 'operationName'
+ equals: 'Microsoft.OperationalInsights/workspaces/delete'
+ }
+ {
+ field: 'status'
+ containsAny: ['succeeded']
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/ActivityLogLAWorkspaceRegenerateKey_04a98577-458a-4a5d-88b2-22b2d140f9f3.bicep b/services/OperationalInsights/workspaces/templates/bicep/ActivityLogLAWorkspaceRegenerateKey_04a98577-458a-4a5d-88b2-22b2d140f9f3.bicep
new file mode 100644
index 000000000..73cd43777
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/ActivityLogLAWorkspaceRegenerateKey_04a98577-458a-4a5d-88b2-22b2d140f9f3.bicep
@@ -0,0 +1,68 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Activity Log Alert for LA Workspace Regenerate Key'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'Administrative'
+ }
+ {
+ field: 'operationName'
+ equals: 'Microsoft.OperationalInsights/workspaces/regeneratesharedkey/action'
+ }
+ {
+ field: 'status'
+ containsAny: ['succeeded']
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageAvailableMBytesMemory_99ba0b14-4b3c-49b5-8763-3161b9aae538.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageAvailableMBytesMemory_99ba0b14-4b3c-49b5-8763-3161b9aae538.bicep
new file mode 100644
index 000000000..fbd706b55
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageAvailableMBytesMemory_99ba0b14-4b3c-49b5-8763-3161b9aae538.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Available MBytes Memory. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_Available MBytes Memory'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageAvailableMBytes_b0c5e86f-eb2d-41ea-a4a0-9819ad841c70.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageAvailableMBytes_b0c5e86f-eb2d-41ea-a4a0-9819ad841c70.bicep
new file mode 100644
index 000000000..16451ebfb
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageAvailableMBytes_b0c5e86f-eb2d-41ea-a4a0-9819ad841c70.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Available MBytes. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 512
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_Available MBytes'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageAvailableMemory_91044c16-83bc-457f-80a9-360bad5dedb4.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageAvailableMemory_91044c16-83bc-457f-80a9-360bad5dedb4.bicep
new file mode 100644
index 000000000..e1f034c27
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageAvailableMemory_91044c16-83bc-457f-80a9-360bad5dedb4.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% Available Memory. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% Available Memory'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageAvgDisksecRead_8b472051-ff68-4059-9e50-243bfb64bae4.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageAvgDisksecRead_8b472051-ff68-4059-9e50-243bfb64bae4.bicep
new file mode 100644
index 000000000..a5b3d4c32
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageAvgDisksecRead_8b472051-ff68-4059-9e50-243bfb64bae4.bicep
@@ -0,0 +1,145 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Avg. Disk sec/Read. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_Avg. Disk sec/Read'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'objectname'
+ operator: 'include'
+ values: ['logicaldisk']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageAvgDisksecWrite_aad0e64e-3cda-45bf-b6bd-8cff29ee35e5.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageAvgDisksecWrite_aad0e64e-3cda-45bf-b6bd-8cff29ee35e5.bicep
new file mode 100644
index 000000000..b22d357cf
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageAvgDisksecWrite_aad0e64e-3cda-45bf-b6bd-8cff29ee35e5.bicep
@@ -0,0 +1,145 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Avg. Disk sec/Write. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_Avg. Disk sec/Write'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'objectname'
+ operator: 'include'
+ values: ['logicaldisk']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageBytesReceivedsec_60ec2790-dc83-419c-bdb5-38da9a477c68.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageBytesReceivedsec_60ec2790-dc83-419c-bdb5-38da9a477c68.bicep
new file mode 100644
index 000000000..512e12c7f
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageBytesReceivedsec_60ec2790-dc83-419c-bdb5-38da9a477c68.bicep
@@ -0,0 +1,167 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Bytes Received/sec. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterOrLessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 3
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'Average_Bytes Received/sec'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'objectname'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'instancename'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'sourcesystem'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageBytesSentsec_de6d5087-bc5a-474f-9319-248a3c03ab44.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageBytesSentsec_de6d5087-bc5a-474f-9319-248a3c03ab44.bicep
new file mode 100644
index 000000000..76b7d80a5
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageBytesSentsec_de6d5087-bc5a-474f-9319-248a3c03ab44.bicep
@@ -0,0 +1,167 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Bytes Sent/sec. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterOrLessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 3
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'Average_Bytes Sent/sec'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'objectname'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'instancename'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'sourcesystem'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageCommittedBytesInUse_a70e406c-a0ae-4e0f-99cd-8b0836812c59.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageCommittedBytesInUse_a70e406c-a0ae-4e0f-99cd-8b0836812c59.bicep
new file mode 100644
index 000000000..b2af56c01
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageCommittedBytesInUse_a70e406c-a0ae-4e0f-99cd-8b0836812c59.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% Committed Bytes In Use. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% Committed Bytes In Use'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageCurrentDiskQueueLength_08a4f049-9bb8-45d0-9dfb-320f385cc71f.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageCurrentDiskQueueLength_08a4f049-9bb8-45d0-9dfb-320f385cc71f.bicep
new file mode 100644
index 000000000..5a8f920de
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageCurrentDiskQueueLength_08a4f049-9bb8-45d0-9dfb-320f385cc71f.bicep
@@ -0,0 +1,150 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Current Disk Queue Length. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_Current Disk Queue Length'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'objectname'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'instancename'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageDiskTransferssec_30b462dd-d026-4122-9bcf-3a114517e04c.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageDiskTransferssec_30b462dd-d026-4122-9bcf-3a114517e04c.bicep
new file mode 100644
index 000000000..9b49ebea2
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageDiskTransferssec_30b462dd-d026-4122-9bcf-3a114517e04c.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Disk Transfers/sec. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_Disk Transfers/sec'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageFreeMegabytes_969677fe-d1e0-42f6-92af-c9269780411b.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageFreeMegabytes_969677fe-d1e0-42f6-92af-c9269780411b.bicep
new file mode 100644
index 000000000..5d15016e7
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageFreeMegabytes_969677fe-d1e0-42f6-92af-c9269780411b.bicep
@@ -0,0 +1,145 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Free Megabytes. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10240
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_Free Megabytes'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'instancename'
+ operator: 'include'
+ values: ['c:','/']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageFreeSpace_db621663-ec0a-4fa3-82a7-b6b110726568.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageFreeSpace_db621663-ec0a-4fa3-82a7-b6b110726568.bicep
new file mode 100644
index 000000000..7110e1027
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageFreeSpace_db621663-ec0a-4fa3-82a7-b6b110726568.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% Free Space. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% Free Space'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageIOWaitTime_1116a5eb-9e12-415a-af46-fad552421d36.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageIOWaitTime_1116a5eb-9e12-415a-af46-fad552421d36.bicep
new file mode 100644
index 000000000..84f70554b
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageIOWaitTime_1116a5eb-9e12-415a-af46-fad552421d36.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% IO Wait Time. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% IO Wait Time'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['vm-prd-dmzout-k8snodes-001']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageIdleTime_732c0a7b-ac17-47cb-bf78-2ebaa839fa0d.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageIdleTime_732c0a7b-ac17-47cb-bf78-2ebaa839fa0d.bicep
new file mode 100644
index 000000000..baf01ab19
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageIdleTime_732c0a7b-ac17-47cb-bf78-2ebaa839fa0d.bicep
@@ -0,0 +1,145 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% Idle Time. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 20
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% Idle Time'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'objectname'
+ operator: 'include'
+ values: ['logicaldisk']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AveragePagessec_88b7198b-32a5-4ae2-aaa5-7925066cc08c.bicep b/services/OperationalInsights/workspaces/templates/bicep/AveragePagessec_88b7198b-32a5-4ae2-aaa5-7925066cc08c.bicep
new file mode 100644
index 000000000..6d0fd48b3
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AveragePagessec_88b7198b-32a5-4ae2-aaa5-7925066cc08c.bicep
@@ -0,0 +1,145 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Pages/sec. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_Pages/sec'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'objectname'
+ operator: 'include'
+ values: ['memory']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageProcessorTime_0c416177-e7ce-40d5-8f15-8566b3d7c03c.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageProcessorTime_0c416177-e7ce-40d5-8f15-8566b3d7c03c.bicep
new file mode 100644
index 000000000..81a62effa
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageProcessorTime_0c416177-e7ce-40d5-8f15-8566b3d7c03c.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% Processor Time. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% Processor Time'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageTotalBytesReceived_593b6885-3fb8-4562-89f1-8b0b68649185.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageTotalBytesReceived_593b6885-3fb8-4562-89f1-8b0b68649185.bicep
new file mode 100644
index 000000000..66ff6189d
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageTotalBytesReceived_593b6885-3fb8-4562-89f1-8b0b68649185.bicep
@@ -0,0 +1,167 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Total Bytes Received. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterOrLessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 3
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'Average_Total Bytes Received'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'objectname'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'instancename'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'sourcesystem'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageTotalBytesTransmitted_76583e85-8be6-4d02-8e09-aff0ce8574f8.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageTotalBytesTransmitted_76583e85-8be6-4d02-8e09-aff0ce8574f8.bicep
new file mode 100644
index 000000000..e89e4ab23
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageTotalBytesTransmitted_76583e85-8be6-4d02-8e09-aff0ce8574f8.bicep
@@ -0,0 +1,167 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_Total Bytes Transmitted. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterOrLessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 3
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'Average_Total Bytes Transmitted'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'objectname'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'instancename'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'sourcesystem'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageUsedInodes_af5d055f-0e1f-4c48-808a-d21f8268357d.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageUsedInodes_af5d055f-0e1f-4c48-808a-d21f8268357d.bicep
new file mode 100644
index 000000000..cffb768be
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageUsedInodes_af5d055f-0e1f-4c48-808a-d21f8268357d.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% Used Inodes. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% Used Inodes'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageUsedMemory_171e5b5c-78cc-44a1-b7fb-7d750914ed5e.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageUsedMemory_171e5b5c-78cc-44a1-b7fb-7d750914ed5e.bicep
new file mode 100644
index 000000000..17b616c90
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageUsedMemory_171e5b5c-78cc-44a1-b7fb-7d750914ed5e.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% Used Memory. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% Used Memory'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageUsedSpace_49ba0df7-18bf-4b3e-9d0f-f8c055762fd5.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageUsedSpace_49ba0df7-18bf-4b3e-9d0f-f8c055762fd5.bicep
new file mode 100644
index 000000000..0c1faedb6
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageUsedSpace_49ba0df7-18bf-4b3e-9d0f-f8c055762fd5.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% Used Space. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% Used Space'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageUsedSwapSpace_04f64694-48a2-48ee-9455-ccce8e59b66f.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageUsedSwapSpace_04f64694-48a2-48ee-9455-ccce8e59b66f.bicep
new file mode 100644
index 000000000..e8847a694
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageUsedSwapSpace_04f64694-48a2-48ee-9455-ccce8e59b66f.bicep
@@ -0,0 +1,150 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% Used Swap Space. Supported for: Linux. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 50
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% Used Swap Space'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'objectname'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'instancename'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/AverageUserTime_b8140cdb-5492-4177-881f-8668372947a8.bicep b/services/OperationalInsights/workspaces/templates/bicep/AverageUserTime_b8140cdb-5492-4177-881f-8668372947a8.bicep
new file mode 100644
index 000000000..8d42d045c
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/AverageUserTime_b8140cdb-5492-4177-881f-8668372947a8.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average_% User Time. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Average_% User Time'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['vm-prd-dmzout-k8snodes-001']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/Event_0b608189-b028-4851-8854-9ce1a48c3dd6.bicep b/services/OperationalInsights/workspaces/templates/bicep/Event_0b608189-b028-4851-8854-9ce1a48c3dd6.bicep
new file mode 100644
index 000000000..c63a033f0
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/Event_0b608189-b028-4851-8854-9ce1a48c3dd6.bicep
@@ -0,0 +1,155 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Event. Supported for: Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Event'
+ dimensions: [
+ {
+ name: 'source'
+ operator: 'include'
+ values: ['service control manager']
+ }
+ {
+ name: 'eventlog'
+ operator: 'include'
+ values: ['system']
+ }
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }
+ {
+ name: 'eventid'
+ operator: 'include'
+ values: ['7031','7024','7034']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/OperationalInsights/workspaces/templates/bicep/Heartbeat_83703f70-9ea8-44aa-b88a-a8e56eb42858.bicep b/services/OperationalInsights/workspaces/templates/bicep/Heartbeat_83703f70-9ea8-44aa-b88a-a8e56eb42858.bicep
new file mode 100644
index 000000000..6b5357ae9
--- /dev/null
+++ b/services/OperationalInsights/workspaces/templates/bicep/Heartbeat_83703f70-9ea8-44aa-b88a-a8e56eb42858.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Heartbeat. Supported for: Linux, Windows. Part of [metric alerts for logs feature](https://aka.ms/am-log-to-metric).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Heartbeat'
+ dimensions: [
+ {
+ name: 'computer'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/PowerBIDedicated/capacities/templates/arm/cpumetric_2993107e-d54f-4fc4-af7a-6a9bc6b4ea46.json b/services/PowerBIDedicated/capacities/templates/arm/cpumetric_2993107e-d54f-4fc4-af7a-6a9bc6b4ea46.json
new file mode 100644
index 000000000..9867d4f47
--- /dev/null
+++ b/services/PowerBIDedicated/capacities/templates/arm/cpumetric_2993107e-d54f-4fc4-af7a-6a9bc6b4ea46.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU Utilization. Supported only for Power BI Embedded Generation 2 resources.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cpu_metric",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/PowerBIDedicated/capacities/templates/bicep/cpumetric_2993107e-d54f-4fc4-af7a-6a9bc6b4ea46.bicep b/services/PowerBIDedicated/capacities/templates/bicep/cpumetric_2993107e-d54f-4fc4-af7a-6a9bc6b4ea46.bicep
new file mode 100644
index 000000000..824eec72b
--- /dev/null
+++ b/services/PowerBIDedicated/capacities/templates/bicep/cpumetric_2993107e-d54f-4fc4-af7a-6a9bc6b4ea46.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU Utilization. Supported only for Power BI Embedded Generation 2 resources.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cpu_metric'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/RecoveryServices/vaults/templates/arm/BackupHealthEvent_8f9b2819-9c51-4f30-91fd-195b7bc5d7a5.json b/services/RecoveryServices/vaults/templates/arm/BackupHealthEvent_8f9b2819-9c51-4f30-91fd-195b7bc5d7a5.json
new file mode 100644
index 000000000..fa0f7417a
--- /dev/null
+++ b/services/RecoveryServices/vaults/templates/arm/BackupHealthEvent_8f9b2819-9c51-4f30-91fd-195b7bc5d7a5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The count of health events pertaining to backup job health",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "P1D",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BackupHealthEvent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/RecoveryServices/vaults/templates/arm/RestoreHealthEvent_805aa9c8-4d52-411d-9811-cc02b33952e3.json b/services/RecoveryServices/vaults/templates/arm/RestoreHealthEvent_805aa9c8-4d52-411d-9811-cc02b33952e3.json
new file mode 100644
index 000000000..e83415b1a
--- /dev/null
+++ b/services/RecoveryServices/vaults/templates/arm/RestoreHealthEvent_805aa9c8-4d52-411d-9811-cc02b33952e3.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The count of health events pertaining to restore job health",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RestoreHealthEvent",
+ "dimensions": [{"operator": "exclude", "name": "healthstatus", "values": ["healthy"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/RecoveryServices/vaults/templates/bicep/BackupHealthEvent_8f9b2819-9c51-4f30-91fd-195b7bc5d7a5.bicep b/services/RecoveryServices/vaults/templates/bicep/BackupHealthEvent_8f9b2819-9c51-4f30-91fd-195b7bc5d7a5.bicep
new file mode 100644
index 000000000..cbd9c411b
--- /dev/null
+++ b/services/RecoveryServices/vaults/templates/bicep/BackupHealthEvent_8f9b2819-9c51-4f30-91fd-195b7bc5d7a5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The count of health events pertaining to backup job health'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'P1D'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BackupHealthEvent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/RecoveryServices/vaults/templates/bicep/RestoreHealthEvent_805aa9c8-4d52-411d-9811-cc02b33952e3.bicep b/services/RecoveryServices/vaults/templates/bicep/RestoreHealthEvent_805aa9c8-4d52-411d-9811-cc02b33952e3.bicep
new file mode 100644
index 000000000..5ebd67f90
--- /dev/null
+++ b/services/RecoveryServices/vaults/templates/bicep/RestoreHealthEvent_805aa9c8-4d52-411d-9811-cc02b33952e3.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The count of health events pertaining to restore job health'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RestoreHealthEvent'
+ dimensions: [
+ {
+ name: 'healthstatus'
+ operator: 'exclude'
+ values: ['healthy']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Resources/subscriptions/templates/arm/ResourceHealthUnhealthy_afcf3ad4-93c9-46e4-bdb7-3a8e9af405d1.json b/services/Resources/subscriptions/templates/arm/ResourceHealthUnhealthy_afcf3ad4-93c9-46e4-bdb7-3a8e9af405d1.json
new file mode 100644
index 000000000..73b325a43
--- /dev/null
+++ b/services/Resources/subscriptions/templates/arm/ResourceHealthUnhealthy_afcf3ad4-93c9-46e4-bdb7-3a8e9af405d1.json
@@ -0,0 +1,111 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Resource Health Unhealthy Alert",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "ResourceHealth"
+ },
+ {
+ "anyOf": [
+ {
+ "field": "properties.cause",
+ "equals": "PlatoformInitiated"
+ },
+ {
+ "field": "properties.cause",
+ "equals": "UserInitiated"
+ }
+ ]
+ },
+ {
+ "anyOf": [
+ {
+ "field": "properties.currentHealthStatus",
+ "equals": "Degraded"
+ },
+ {
+ "field": "properties.currentHealthStatus",
+ "equals": "Unavailable"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Resources/subscriptions/templates/arm/ServiceHealthAdvisory_7b56e46e-8fbf-404d-a1e5-fbb3d9ea8d7e.json b/services/Resources/subscriptions/templates/arm/ServiceHealthAdvisory_7b56e46e-8fbf-404d-a1e5-fbb3d9ea8d7e.json
new file mode 100644
index 000000000..2c6816dde
--- /dev/null
+++ b/services/Resources/subscriptions/templates/arm/ServiceHealthAdvisory_7b56e46e-8fbf-404d-a1e5-fbb3d9ea8d7e.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Service Health Advisory Alert",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('##TELEMETRY_PID-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "ServiceHealth"
+ },
+ {
+ "field": "properties.incidentType",
+ "equals": "ActionRequired"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Resources/subscriptions/templates/arm/ServiceHealthIncident_f0dfdd7b-8e50-4a96-ba7f-9a58280f0df0.json b/services/Resources/subscriptions/templates/arm/ServiceHealthIncident_f0dfdd7b-8e50-4a96-ba7f-9a58280f0df0.json
new file mode 100644
index 000000000..1e9acbc5c
--- /dev/null
+++ b/services/Resources/subscriptions/templates/arm/ServiceHealthIncident_f0dfdd7b-8e50-4a96-ba7f-9a58280f0df0.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Service Health Incident Alert",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('##TELEMETRY_PID-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "ServiceHealth"
+ },
+ {
+ "field": "properties.incidentType",
+ "equals": "Incident"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Resources/subscriptions/templates/arm/ServiceHealthMaintenance_26a33edf-0698-424d-aae2-6bcd5af323d5.json b/services/Resources/subscriptions/templates/arm/ServiceHealthMaintenance_26a33edf-0698-424d-aae2-6bcd5af323d5.json
new file mode 100644
index 000000000..fe9c5cab5
--- /dev/null
+++ b/services/Resources/subscriptions/templates/arm/ServiceHealthMaintenance_26a33edf-0698-424d-aae2-6bcd5af323d5.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Service Health Maintenance Alert",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('##TELEMETRY_PID-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "ServiceHealth"
+ },
+ {
+ "field": "properties.incidentType",
+ "equals": "Maintenance"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Resources/subscriptions/templates/arm/ServiceHealthSecurity_89dbd4e4-f709-47c6-a243-4207678c8473.json b/services/Resources/subscriptions/templates/arm/ServiceHealthSecurity_89dbd4e4-f709-47c6-a243-4207678c8473.json
new file mode 100644
index 000000000..a28f6f8ce
--- /dev/null
+++ b/services/Resources/subscriptions/templates/arm/ServiceHealthSecurity_89dbd4e4-f709-47c6-a243-4207678c8473.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Service Health Security Alert",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('##TELEMETRY_PID-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "ServiceHealth"
+ },
+ {
+ "field": "properties.incidentType",
+ "equals": "Security"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Resources/subscriptions/templates/bicep/ResourceHealthUnhealthy_afcf3ad4-93c9-46e4-bdb7-3a8e9af405d1.bicep b/services/Resources/subscriptions/templates/bicep/ResourceHealthUnhealthy_afcf3ad4-93c9-46e4-bdb7-3a8e9af405d1.bicep
new file mode 100644
index 000000000..9086def85
--- /dev/null
+++ b/services/Resources/subscriptions/templates/bicep/ResourceHealthUnhealthy_afcf3ad4-93c9-46e4-bdb7-3a8e9af405d1.bicep
@@ -0,0 +1,82 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Resource Health Unhealthy Alert'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ field: 'category'
+ equals: 'ResourceHealth'
+ }
+ {
+ anyOf: [
+ {
+ field: 'properties.cause'
+ equals: 'PlatoformInitiated'
+ }
+ {
+ field: 'properties.cause'
+ equals: 'UserInitiated'
+ }
+ ]
+ }
+ {
+ anyOf: [
+ {
+ field: 'properties.currentHealthStatus'
+ equals: 'Degraded'
+ }
+ {
+ field: 'properties.currentHealthStatus'
+ equals: 'Unavailable'
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Resources/subscriptions/templates/bicep/ServiceHealthAdvisory_7b56e46e-8fbf-404d-a1e5-fbb3d9ea8d7e.bicep b/services/Resources/subscriptions/templates/bicep/ServiceHealthAdvisory_7b56e46e-8fbf-404d-a1e5-fbb3d9ea8d7e.bicep
new file mode 100644
index 000000000..8f0bf3328
--- /dev/null
+++ b/services/Resources/subscriptions/templates/bicep/ServiceHealthAdvisory_7b56e46e-8fbf-404d-a1e5-fbb3d9ea8d7e.bicep
@@ -0,0 +1,64 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Service Health Advisory Alert'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'ServiceHealth'
+ }
+ {
+ field: 'properties.incidentType'
+ equals: 'ActionRequired'
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Resources/subscriptions/templates/bicep/ServiceHealthIncident_f0dfdd7b-8e50-4a96-ba7f-9a58280f0df0.bicep b/services/Resources/subscriptions/templates/bicep/ServiceHealthIncident_f0dfdd7b-8e50-4a96-ba7f-9a58280f0df0.bicep
new file mode 100644
index 000000000..25b383411
--- /dev/null
+++ b/services/Resources/subscriptions/templates/bicep/ServiceHealthIncident_f0dfdd7b-8e50-4a96-ba7f-9a58280f0df0.bicep
@@ -0,0 +1,64 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Service Health Incident Alert'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'ServiceHealth'
+ }
+ {
+ field: 'properties.incidentType'
+ equals: 'Incident'
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Resources/subscriptions/templates/bicep/ServiceHealthMaintenance_26a33edf-0698-424d-aae2-6bcd5af323d5.bicep b/services/Resources/subscriptions/templates/bicep/ServiceHealthMaintenance_26a33edf-0698-424d-aae2-6bcd5af323d5.bicep
new file mode 100644
index 000000000..39aac2d44
--- /dev/null
+++ b/services/Resources/subscriptions/templates/bicep/ServiceHealthMaintenance_26a33edf-0698-424d-aae2-6bcd5af323d5.bicep
@@ -0,0 +1,64 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Service Health Maintenance Alert'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'ServiceHealth'
+ }
+ {
+ field: 'properties.incidentType'
+ equals: 'Maintenance'
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Resources/subscriptions/templates/bicep/ServiceHealthSecurity_89dbd4e4-f709-47c6-a243-4207678c8473.bicep b/services/Resources/subscriptions/templates/bicep/ServiceHealthSecurity_89dbd4e4-f709-47c6-a243-4207678c8473.bicep
new file mode 100644
index 000000000..dba58288d
--- /dev/null
+++ b/services/Resources/subscriptions/templates/bicep/ServiceHealthSecurity_89dbd4e4-f709-47c6-a243-4207678c8473.bicep
@@ -0,0 +1,64 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Service Health Security Alert'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'ServiceHealth'
+ }
+ {
+ field: 'properties.incidentType'
+ equals: 'Security'
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Search/searchServices/templates/arm/SearchLatency_d3985fe5-c7f0-47a1-b52e-26098345a433.json b/services/Search/searchServices/templates/arm/SearchLatency_d3985fe5-c7f0-47a1-b52e-26098345a433.json
new file mode 100644
index 000000000..53f3f9053
--- /dev/null
+++ b/services/Search/searchServices/templates/arm/SearchLatency_d3985fe5-c7f0-47a1-b52e-26098345a433.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average search latency for the search service",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SearchLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Search/searchServices/templates/arm/ThrottledSearchQueriesPercentage_7a044f2f-f38f-4f13-82eb-c7f49bf17ad0.json b/services/Search/searchServices/templates/arm/ThrottledSearchQueriesPercentage_7a044f2f-f38f-4f13-82eb-c7f49bf17ad0.json
new file mode 100644
index 000000000..e43ec52fb
--- /dev/null
+++ b/services/Search/searchServices/templates/arm/ThrottledSearchQueriesPercentage_7a044f2f-f38f-4f13-82eb-c7f49bf17ad0.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of search queries that were throttled for the search service",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ThrottledSearchQueriesPercentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Search/searchServices/templates/bicep/SearchLatency_d3985fe5-c7f0-47a1-b52e-26098345a433.bicep b/services/Search/searchServices/templates/bicep/SearchLatency_d3985fe5-c7f0-47a1-b52e-26098345a433.bicep
new file mode 100644
index 000000000..12e89ff8a
--- /dev/null
+++ b/services/Search/searchServices/templates/bicep/SearchLatency_d3985fe5-c7f0-47a1-b52e-26098345a433.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average search latency for the search service'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SearchLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Search/searchServices/templates/bicep/ThrottledSearchQueriesPercentage_7a044f2f-f38f-4f13-82eb-c7f49bf17ad0.bicep b/services/Search/searchServices/templates/bicep/ThrottledSearchQueriesPercentage_7a044f2f-f38f-4f13-82eb-c7f49bf17ad0.bicep
new file mode 100644
index 000000000..0a04dba61
--- /dev/null
+++ b/services/Search/searchServices/templates/bicep/ThrottledSearchQueriesPercentage_7a044f2f-f38f-4f13-82eb-c7f49bf17ad0.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of search queries that were throttled for the search service'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ThrottledSearchQueriesPercentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/AbandonMessage_172396a9-27f0-4c01-9510-94ba4a0d4738.json b/services/ServiceBus/namespaces/templates/arm/AbandonMessage_172396a9-27f0-4c01-9510-94ba4a0d4738.json
new file mode 100644
index 000000000..0cbe97153
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/AbandonMessage_172396a9-27f0-4c01-9510-94ba4a0d4738.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of messages abandoned on a Queue/Topic.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "AbandonMessage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/ActiveConnections_784a29e7-5799-4fde-90ee-b6ebcb2a8747.json b/services/ServiceBus/namespaces/templates/arm/ActiveConnections_784a29e7-5799-4fde-90ee-b6ebcb2a8747.json
new file mode 100644
index 000000000..79ac3c627
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/ActiveConnections_784a29e7-5799-4fde-90ee-b6ebcb2a8747.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total Active Connections for Microsoft.ServiceBus.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ActiveConnections",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/ActiveMessages_0b3362f7-b1ff-4d78-8c25-f14ee9300ae1.json b/services/ServiceBus/namespaces/templates/arm/ActiveMessages_0b3362f7-b1ff-4d78-8c25-f14ee9300ae1.json
new file mode 100644
index 000000000..e4142bba5
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/ActiveMessages_0b3362f7-b1ff-4d78-8c25-f14ee9300ae1.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of active messages in a Queue/Topic.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ActiveMessages",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/DeadletteredMessages_868a7fc3-9c5c-4fb4-9289-fbe10dd4db82.json b/services/ServiceBus/namespaces/templates/arm/DeadletteredMessages_868a7fc3-9c5c-4fb4-9289-fbe10dd4db82.json
new file mode 100644
index 000000000..9a5e82483
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/DeadletteredMessages_868a7fc3-9c5c-4fb4-9289-fbe10dd4db82.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of dead-lettered messages in a Queue/Topic.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DeadletteredMessages",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/IncomingMessages_c1095936-da8d-4c63-ac70-cf97d5b1f630.json b/services/ServiceBus/namespaces/templates/arm/IncomingMessages_c1095936-da8d-4c63-ac70-cf97d5b1f630.json
new file mode 100644
index 000000000..77e0f6e9b
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/IncomingMessages_c1095936-da8d-4c63-ac70-cf97d5b1f630.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Incoming Messages for Microsoft.ServiceBus.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IncomingMessages",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/Messages_67872571-d13d-4123-81c5-60404c4eea45.json b/services/ServiceBus/namespaces/templates/arm/Messages_67872571-d13d-4123-81c5-60404c4eea45.json
new file mode 100644
index 000000000..6206cc946
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/Messages_67872571-d13d-4123-81c5-60404c4eea45.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of messages in a Queue/Topic.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Messages",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/NamespaceCpuUsage_52ec94f5-0d89-434b-9d51-df92d69ba284.json b/services/ServiceBus/namespaces/templates/arm/NamespaceCpuUsage_52ec94f5-0d89-434b-9d51-df92d69ba284.json
new file mode 100644
index 000000000..06a7c4804
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/NamespaceCpuUsage_52ec94f5-0d89-434b-9d51-df92d69ba284.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Service bus premium namespace CPU usage metric.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "85",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "NamespaceCpuUsage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/NamespaceMemoryUsage_860d21ea-8c6a-4c78-ac40-f556eb02c3ac.json b/services/ServiceBus/namespaces/templates/arm/NamespaceMemoryUsage_860d21ea-8c6a-4c78-ac40-f556eb02c3ac.json
new file mode 100644
index 000000000..688bb2807
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/NamespaceMemoryUsage_860d21ea-8c6a-4c78-ac40-f556eb02c3ac.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Service bus premium namespace memory usage metric.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "NamespaceMemoryUsage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/OutgoingMessages_fdde6805-edf8-4277-adb8-ad2f44e3f977.json b/services/ServiceBus/namespaces/templates/arm/OutgoingMessages_fdde6805-edf8-4277-adb8-ad2f44e3f977.json
new file mode 100644
index 000000000..486b5288a
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/OutgoingMessages_fdde6805-edf8-4277-adb8-ad2f44e3f977.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Outgoing Messages for Microsoft.ServiceBus.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OutgoingMessages",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/ScheduledMessages_5543b815-f2c8-420e-847e-7507a9724557.json b/services/ServiceBus/namespaces/templates/arm/ScheduledMessages_5543b815-f2c8-420e-847e-7507a9724557.json
new file mode 100644
index 000000000..4f2c580fb
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/ScheduledMessages_5543b815-f2c8-420e-847e-7507a9724557.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of scheduled messages in a Queue/Topic.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "500",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ScheduledMessages",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/ServerErrors_c51c3514-1730-42f3-b8ae-f2980bd22d83.json b/services/ServiceBus/namespaces/templates/arm/ServerErrors_c51c3514-1730-42f3-b8ae-f2980bd22d83.json
new file mode 100644
index 000000000..ec5bcdb98
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/ServerErrors_c51c3514-1730-42f3-b8ae-f2980bd22d83.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Server Errors for Microsoft.ServiceBus.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ServerErrors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/ServerSendLatency_487c6beb-1468-4167-8eb6-e9b3ad8743b1.json b/services/ServiceBus/namespaces/templates/arm/ServerSendLatency_487c6beb-1468-4167-8eb6-e9b3ad8743b1.json
new file mode 100644
index 000000000..fc7aed177
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/ServerSendLatency_487c6beb-1468-4167-8eb6-e9b3ad8743b1.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Latency of Send Message operations for Service Bus resources.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "500",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ServerSendLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/Size_950586ee-6926-4483-96d4-82838afe1ca6.json b/services/ServiceBus/namespaces/templates/arm/Size_950586ee-6926-4483-96d4-82838afe1ca6.json
new file mode 100644
index 000000000..7c402b532
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/Size_950586ee-6926-4483-96d4-82838afe1ca6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Size of an Queue/Topic in Bytes.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "3000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Size",
+ "dimensions": [{"operator": "include", "name": "entityname", "values": ["lp-cl-sa-centralus-queue"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/ThrottledRequests_19785707-24c9-4852-b92a-31732b86ee04.json b/services/ServiceBus/namespaces/templates/arm/ThrottledRequests_19785707-24c9-4852-b92a-31732b86ee04.json
new file mode 100644
index 000000000..9eded32ad
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/ThrottledRequests_19785707-24c9-4852-b92a-31732b86ee04.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Throttled Requests for Microsoft.ServiceBus.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ThrottledRequests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/arm/UserErrors_a57a1cc4-4ec9-4d8f-a81d-7e18afe54948.json b/services/ServiceBus/namespaces/templates/arm/UserErrors_a57a1cc4-4ec9-4d8f-a81d-7e18afe54948.json
new file mode 100644
index 000000000..d311e5e1d
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/arm/UserErrors_a57a1cc4-4ec9-4d8f-a81d-7e18afe54948.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "User Errors for Microsoft.ServiceBus.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UserErrors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/AbandonMessage_172396a9-27f0-4c01-9510-94ba4a0d4738.bicep b/services/ServiceBus/namespaces/templates/bicep/AbandonMessage_172396a9-27f0-4c01-9510-94ba4a0d4738.bicep
new file mode 100644
index 000000000..c0370ff20
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/AbandonMessage_172396a9-27f0-4c01-9510-94ba4a0d4738.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of messages abandoned on a Queue/Topic.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'AbandonMessage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/ActiveConnections_784a29e7-5799-4fde-90ee-b6ebcb2a8747.bicep b/services/ServiceBus/namespaces/templates/bicep/ActiveConnections_784a29e7-5799-4fde-90ee-b6ebcb2a8747.bicep
new file mode 100644
index 000000000..cba9fffab
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/ActiveConnections_784a29e7-5799-4fde-90ee-b6ebcb2a8747.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total Active Connections for Microsoft.ServiceBus.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ActiveConnections'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/ActiveMessages_0b3362f7-b1ff-4d78-8c25-f14ee9300ae1.bicep b/services/ServiceBus/namespaces/templates/bicep/ActiveMessages_0b3362f7-b1ff-4d78-8c25-f14ee9300ae1.bicep
new file mode 100644
index 000000000..66a1a8a84
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/ActiveMessages_0b3362f7-b1ff-4d78-8c25-f14ee9300ae1.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of active messages in a Queue/Topic.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ActiveMessages'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/DeadletteredMessages_868a7fc3-9c5c-4fb4-9289-fbe10dd4db82.bicep b/services/ServiceBus/namespaces/templates/bicep/DeadletteredMessages_868a7fc3-9c5c-4fb4-9289-fbe10dd4db82.bicep
new file mode 100644
index 000000000..298cfa6cd
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/DeadletteredMessages_868a7fc3-9c5c-4fb4-9289-fbe10dd4db82.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of dead-lettered messages in a Queue/Topic.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DeadletteredMessages'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/IncomingMessages_c1095936-da8d-4c63-ac70-cf97d5b1f630.bicep b/services/ServiceBus/namespaces/templates/bicep/IncomingMessages_c1095936-da8d-4c63-ac70-cf97d5b1f630.bicep
new file mode 100644
index 000000000..743761175
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/IncomingMessages_c1095936-da8d-4c63-ac70-cf97d5b1f630.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Incoming Messages for Microsoft.ServiceBus.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IncomingMessages'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/Messages_67872571-d13d-4123-81c5-60404c4eea45.bicep b/services/ServiceBus/namespaces/templates/bicep/Messages_67872571-d13d-4123-81c5-60404c4eea45.bicep
new file mode 100644
index 000000000..daa0d6021
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/Messages_67872571-d13d-4123-81c5-60404c4eea45.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of messages in a Queue/Topic.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Messages'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/NamespaceCpuUsage_52ec94f5-0d89-434b-9d51-df92d69ba284.bicep b/services/ServiceBus/namespaces/templates/bicep/NamespaceCpuUsage_52ec94f5-0d89-434b-9d51-df92d69ba284.bicep
new file mode 100644
index 000000000..f9cfb017f
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/NamespaceCpuUsage_52ec94f5-0d89-434b-9d51-df92d69ba284.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Service bus premium namespace CPU usage metric.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 85
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'NamespaceCpuUsage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/NamespaceMemoryUsage_860d21ea-8c6a-4c78-ac40-f556eb02c3ac.bicep b/services/ServiceBus/namespaces/templates/bicep/NamespaceMemoryUsage_860d21ea-8c6a-4c78-ac40-f556eb02c3ac.bicep
new file mode 100644
index 000000000..a88faff00
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/NamespaceMemoryUsage_860d21ea-8c6a-4c78-ac40-f556eb02c3ac.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Service bus premium namespace memory usage metric.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'NamespaceMemoryUsage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/OutgoingMessages_fdde6805-edf8-4277-adb8-ad2f44e3f977.bicep b/services/ServiceBus/namespaces/templates/bicep/OutgoingMessages_fdde6805-edf8-4277-adb8-ad2f44e3f977.bicep
new file mode 100644
index 000000000..efd98572d
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/OutgoingMessages_fdde6805-edf8-4277-adb8-ad2f44e3f977.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Outgoing Messages for Microsoft.ServiceBus.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OutgoingMessages'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/ScheduledMessages_5543b815-f2c8-420e-847e-7507a9724557.bicep b/services/ServiceBus/namespaces/templates/bicep/ScheduledMessages_5543b815-f2c8-420e-847e-7507a9724557.bicep
new file mode 100644
index 000000000..7c73e4128
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/ScheduledMessages_5543b815-f2c8-420e-847e-7507a9724557.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of scheduled messages in a Queue/Topic.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 500
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ScheduledMessages'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/ServerErrors_c51c3514-1730-42f3-b8ae-f2980bd22d83.bicep b/services/ServiceBus/namespaces/templates/bicep/ServerErrors_c51c3514-1730-42f3-b8ae-f2980bd22d83.bicep
new file mode 100644
index 000000000..f1020b25a
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/ServerErrors_c51c3514-1730-42f3-b8ae-f2980bd22d83.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Server Errors for Microsoft.ServiceBus.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ServerErrors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/ServerSendLatency_487c6beb-1468-4167-8eb6-e9b3ad8743b1.bicep b/services/ServiceBus/namespaces/templates/bicep/ServerSendLatency_487c6beb-1468-4167-8eb6-e9b3ad8743b1.bicep
new file mode 100644
index 000000000..6956ba9f6
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/ServerSendLatency_487c6beb-1468-4167-8eb6-e9b3ad8743b1.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Latency of Send Message operations for Service Bus resources.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 500
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ServerSendLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/Size_950586ee-6926-4483-96d4-82838afe1ca6.bicep b/services/ServiceBus/namespaces/templates/bicep/Size_950586ee-6926-4483-96d4-82838afe1ca6.bicep
new file mode 100644
index 000000000..ceeadee5c
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/Size_950586ee-6926-4483-96d4-82838afe1ca6.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Size of an Queue/Topic in Bytes.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 3000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Size'
+ dimensions: [
+ {
+ name: 'entityname'
+ operator: 'include'
+ values: ['lp-cl-sa-centralus-queue']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/ThrottledRequests_19785707-24c9-4852-b92a-31732b86ee04.bicep b/services/ServiceBus/namespaces/templates/bicep/ThrottledRequests_19785707-24c9-4852-b92a-31732b86ee04.bicep
new file mode 100644
index 000000000..8efeab64c
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/ThrottledRequests_19785707-24c9-4852-b92a-31732b86ee04.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Throttled Requests for Microsoft.ServiceBus.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ThrottledRequests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/ServiceBus/namespaces/templates/bicep/UserErrors_a57a1cc4-4ec9-4d8f-a81d-7e18afe54948.bicep b/services/ServiceBus/namespaces/templates/bicep/UserErrors_a57a1cc4-4ec9-4d8f-a81d-7e18afe54948.bicep
new file mode 100644
index 000000000..478463c9c
--- /dev/null
+++ b/services/ServiceBus/namespaces/templates/bicep/UserErrors_a57a1cc4-4ec9-4d8f-a81d-7e18afe54948.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'User Errors for Microsoft.ServiceBus.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UserErrors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/SignalRService/SignalR/templates/arm/ConnectionCount_b7581df7-f127-405e-9408-9d484122be74.json b/services/SignalRService/SignalR/templates/arm/ConnectionCount_b7581df7-f127-405e-9408-9d484122be74.json
new file mode 100644
index 000000000..dc41e37f4
--- /dev/null
+++ b/services/SignalRService/SignalR/templates/arm/ConnectionCount_b7581df7-f127-405e-9408-9d484122be74.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of user connection.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "900",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ConnectionCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/SignalRService/SignalR/templates/bicep/ConnectionCount_b7581df7-f127-405e-9408-9d484122be74.bicep b/services/SignalRService/SignalR/templates/bicep/ConnectionCount_b7581df7-f127-405e-9408-9d484122be74.bicep
new file mode 100644
index 000000000..7a67aeaf2
--- /dev/null
+++ b/services/SignalRService/SignalR/templates/bicep/ConnectionCount_b7581df7-f127-405e-9408-9d484122be74.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of user connection.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 900
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ConnectionCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/managedInstances/templates/arm/avgcpupercent_dfd37715-0d5c-4ec5-98ae-836cd626a27f.json b/services/Sql/managedInstances/templates/arm/avgcpupercent_dfd37715-0d5c-4ec5-98ae-836cd626a27f.json
new file mode 100644
index 000000000..ff10c9b7f
--- /dev/null
+++ b/services/Sql/managedInstances/templates/arm/avgcpupercent_dfd37715-0d5c-4ec5-98ae-836cd626a27f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Average CPU percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "avg_cpu_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/managedInstances/templates/arm/storagespaceusedmb_641ca3dc-a00f-43ac-b6bd-4f5d16f35cac.json b/services/Sql/managedInstances/templates/arm/storagespaceusedmb_641ca3dc-a00f-43ac-b6bd-4f5d16f35cac.json
new file mode 100644
index 000000000..6ce795c27
--- /dev/null
+++ b/services/Sql/managedInstances/templates/arm/storagespaceusedmb_641ca3dc-a00f-43ac-b6bd-4f5d16f35cac.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Storage space used",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "storage_space_used_mb",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/managedInstances/templates/bicep/avgcpupercent_dfd37715-0d5c-4ec5-98ae-836cd626a27f.bicep b/services/Sql/managedInstances/templates/bicep/avgcpupercent_dfd37715-0d5c-4ec5-98ae-836cd626a27f.bicep
new file mode 100644
index 000000000..d942ae311
--- /dev/null
+++ b/services/Sql/managedInstances/templates/bicep/avgcpupercent_dfd37715-0d5c-4ec5-98ae-836cd626a27f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Average CPU percentage'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'avg_cpu_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/managedInstances/templates/bicep/storagespaceusedmb_641ca3dc-a00f-43ac-b6bd-4f5d16f35cac.bicep b/services/Sql/managedInstances/templates/bicep/storagespaceusedmb_641ca3dc-a00f-43ac-b6bd-4f5d16f35cac.bicep
new file mode 100644
index 000000000..4b9dce537
--- /dev/null
+++ b/services/Sql/managedInstances/templates/bicep/storagespaceusedmb_641ca3dc-a00f-43ac-b6bd-4f5d16f35cac.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Storage space used'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'storage_space_used_mb'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/arm/databases-appcpupercent_05591510-5fe2-454a-96d8-bbda8201c6a4.json b/services/Sql/servers/templates/arm/databases-appcpupercent_05591510-5fe2-454a-96d8-bbda8201c6a4.json
new file mode 100644
index 000000000..5cd0f6075
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-appcpupercent_05591510-5fe2-454a-96d8-bbda8201c6a4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "App CPU percentage. Applies to serverless databases.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "app_cpu_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-appmemorypercent_c5c95fe9-a4b4-4afa-a07a-a0d18804d416.json b/services/Sql/servers/templates/arm/databases-appmemorypercent_c5c95fe9-a4b4-4afa-a07a-a0d18804d416.json
new file mode 100644
index 000000000..72efc401a
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-appmemorypercent_c5c95fe9-a4b4-4afa-a07a-a0d18804d416.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "App memory percentage. Applies to serverless databases.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "app_memory_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-blockedbyfirewall_2cda2f3a-8657-431a-a50f-56835aea9a81.json b/services/Sql/servers/templates/arm/databases-blockedbyfirewall_2cda2f3a-8657-431a-a50f-56835aea9a81.json
new file mode 100644
index 000000000..d73f91d56
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-blockedbyfirewall_2cda2f3a-8657-431a-a50f-56835aea9a81.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Blocked by Firewall",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "blocked_by_firewall",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-connectionfailed_7157dc17-9d5a-4835-a122-1d0d904d61ff.json b/services/Sql/servers/templates/arm/databases-connectionfailed_7157dc17-9d5a-4835-a122-1d0d904d61ff.json
new file mode 100644
index 000000000..fe8287642
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-connectionfailed_7157dc17-9d5a-4835-a122-1d0d904d61ff.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed Connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "connection_failed",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-connectionfailedusererror_d528ffcb-3a99-4356-96d1-981499139ffb.json b/services/Sql/servers/templates/arm/databases-connectionfailedusererror_d528ffcb-3a99-4356-96d1-981499139ffb.json
new file mode 100644
index 000000000..4d67e96be
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-connectionfailedusererror_d528ffcb-3a99-4356-96d1-981499139ffb.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed Connections : User Errors",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "connection_failed_user_error",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-connectionsuccessful_460b6b29-a602-4409-b748-6b47b232a984.json b/services/Sql/servers/templates/arm/databases-connectionsuccessful_460b6b29-a602-4409-b748-6b47b232a984.json
new file mode 100644
index 000000000..7e444ed33
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-connectionsuccessful_460b6b29-a602-4409-b748-6b47b232a984.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Successful Connections",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 5,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 5,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "connection_successful",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-cpuused_3ddd3f95-989c-4777-b6b8-728439aae1df.json b/services/Sql/servers/templates/arm/databases-cpuused_3ddd3f95-989c-4777-b6b8-728439aae1df.json
new file mode 100644
index 000000000..00ba0cc4f
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-cpuused_3ddd3f95-989c-4777-b6b8-728439aae1df.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU used. Applies to vCore-based databases.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cpu_used",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-deadlock_ce44fc81-3610-4165-a107-9dd4b8ab3972.json b/services/Sql/servers/templates/arm/databases-deadlock_ce44fc81-3610-4165-a107-9dd4b8ab3972.json
new file mode 100644
index 000000000..8f91fa056
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-deadlock_ce44fc81-3610-4165-a107-9dd4b8ab3972.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Deadlocks. Not applicable to data warehouses.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "deadlock",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-dtulimit_50124594-a291-4183-a8e3-195f5e6f5204.json b/services/Sql/servers/templates/arm/databases-dtulimit_50124594-a291-4183-a8e3-195f5e6f5204.json
new file mode 100644
index 000000000..e65aa8d5b
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-dtulimit_50124594-a291-4183-a8e3-195f5e6f5204.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "DTU Limit. Applies to DTU-based databases.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "dtu_limit",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-dtuused_d26f4c8b-0461-4c57-b230-cbd1a5424db1.json b/services/Sql/servers/templates/arm/databases-dtuused_d26f4c8b-0461-4c57-b230-cbd1a5424db1.json
new file mode 100644
index 000000000..31a119b4f
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-dtuused_d26f4c8b-0461-4c57-b230-cbd1a5424db1.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "DTU used. Applies to DTU-based databases.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "dtu_used",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-dwuconsumptionpercent_70f88865-7a8b-4e03-9252-a9369df503ef.json b/services/Sql/servers/templates/arm/databases-dwuconsumptionpercent_70f88865-7a8b-4e03-9252-a9369df503ef.json
new file mode 100644
index 000000000..fc87896fa
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-dwuconsumptionpercent_70f88865-7a8b-4e03-9252-a9369df503ef.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "DWU percentage. Applies only to data warehouses.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "dwu_consumption_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-memoryusagepercent_f5c13b49-8528-457d-9d7d-083b8433bf96.json b/services/Sql/servers/templates/arm/databases-memoryusagepercent_f5c13b49-8528-457d-9d7d-083b8433bf96.json
new file mode 100644
index 000000000..3ee1a3d30
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-memoryusagepercent_f5c13b49-8528-457d-9d7d-083b8433bf96.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory percentage. Applies only to data warehouses.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "memory_usage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-sessionscount_07eeae07-010e-47ca-ad90-fa7adb5a6c52.json b/services/Sql/servers/templates/arm/databases-sessionscount_07eeae07-010e-47ca-ad90-fa7adb5a6c52.json
new file mode 100644
index 000000000..030be4dd8
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-sessionscount_07eeae07-010e-47ca-ad90-fa7adb5a6c52.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Number of active sessions. Not applicable to Synapse DW Analytics.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "sessions_count",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-sqlinstancecpupercent_1a8132b9-fbd2-4ac5-9e08-96358e16b7f7.json b/services/Sql/servers/templates/arm/databases-sqlinstancecpupercent_1a8132b9-fbd2-4ac5-9e08-96358e16b7f7.json
new file mode 100644
index 000000000..e1b48a573
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-sqlinstancecpupercent_1a8132b9-fbd2-4ac5-9e08-96358e16b7f7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU usage by all user and system workloads. Not applicable to data warehouses.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "70",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "sql_instance_cpu_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-sqlinstancememorypercent_f44a3cb0-6e99-4a5e-a691-c5d7d5bf7e64.json b/services/Sql/servers/templates/arm/databases-sqlinstancememorypercent_f44a3cb0-6e99-4a5e-a691-c5d7d5bf7e64.json
new file mode 100644
index 000000000..49bfcfa43
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-sqlinstancememorypercent_f44a3cb0-6e99-4a5e-a691-c5d7d5bf7e64.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory usage by the database engine instance. Not applicable to data warehouses.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "sql_instance_memory_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-storage_86922a27-41bb-4834-bc54-0b602b275597.json b/services/Sql/servers/templates/arm/databases-storage_86922a27-41bb-4834-bc54-0b602b275597.json
new file mode 100644
index 000000000..085a8e123
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-storage_86922a27-41bb-4834-bc54-0b602b275597.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Data space used. Not applicable to data warehouses.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "934584883610",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "storage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/databases-tempdbdatasize_0fe27fd1-e4f7-48c1-bbd2-a6953755d5e8.json b/services/Sql/servers/templates/arm/databases-tempdbdatasize_0fe27fd1-e4f7-48c1-bbd2-a6953755d5e8.json
new file mode 100644
index 000000000..8bb98d752
--- /dev/null
+++ b/services/Sql/servers/templates/arm/databases-tempdbdatasize_0fe27fd1-e4f7-48c1-bbd2-a6953755d5e8.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Space used in tempdb data files in kilobytes. Not applicable to data warehouses.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "tempdb_data_size",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-allocateddatastorage_3743016a-a056-43fe-b53a-36dd9a17626d.json b/services/Sql/servers/templates/arm/elasticpools-allocateddatastorage_3743016a-a056-43fe-b53a-36dd9a17626d.json
new file mode 100644
index 000000000..12f827c1e
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-allocateddatastorage_3743016a-a056-43fe-b53a-36dd9a17626d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Data space allocated. Not applicable to hyperscale",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "225000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "allocated_data_storage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-allocateddatastoragepercent_7e9d0710-3243-4cf2-8b73-6be1539b8545.json b/services/Sql/servers/templates/arm/elasticpools-allocateddatastoragepercent_7e9d0710-3243-4cf2-8b73-6be1539b8545.json
new file mode 100644
index 000000000..bf409677b
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-allocateddatastoragepercent_7e9d0710-3243-4cf2-8b73-6be1539b8545.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Data space allocated percent. Not applicable to hyperscale",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "allocated_data_storage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-cpupercent_805c4ae5-a852-43bd-ad1c-0f7f381d8f32.json b/services/Sql/servers/templates/arm/elasticpools-cpupercent_805c4ae5-a852-43bd-ad1c-0f7f381d8f32.json
new file mode 100644
index 000000000..5c041742b
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-cpupercent_805c4ae5-a852-43bd-ad1c-0f7f381d8f32.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "cpu_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-dtuconsumptionpercent_5d9075b5-3c19-4cf6-9c2e-50ba4c175691.json b/services/Sql/servers/templates/arm/elasticpools-dtuconsumptionpercent_5d9075b5-3c19-4cf6-9c2e-50ba4c175691.json
new file mode 100644
index 000000000..b0911e48b
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-dtuconsumptionpercent_5d9075b5-3c19-4cf6-9c2e-50ba4c175691.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "DTU Percentage. Applies to DTU-based elastic pools.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "dtu_consumption_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-eDTUused_16a64053-1905-4d8e-8198-810584cad108.json b/services/Sql/servers/templates/arm/elasticpools-eDTUused_16a64053-1905-4d8e-8198-810584cad108.json
new file mode 100644
index 000000000..6c8f6cfbf
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-eDTUused_16a64053-1905-4d8e-8198-810584cad108.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "eDTU used. Applies to DTU-based elastic pools.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "eDTU_used",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-logwritepercent_47cd814e-1991-437e-8feb-e589a250d2a3.json b/services/Sql/servers/templates/arm/elasticpools-logwritepercent_47cd814e-1991-437e-8feb-e589a250d2a3.json
new file mode 100644
index 000000000..16ede7623
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-logwritepercent_47cd814e-1991-437e-8feb-e589a250d2a3.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Log IO percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "log_write_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-physicaldatareadpercent_92efc2ea-b6ed-41aa-921c-6d40e7b58c27.json b/services/Sql/servers/templates/arm/elasticpools-physicaldatareadpercent_92efc2ea-b6ed-41aa-921c-6d40e7b58c27.json
new file mode 100644
index 000000000..2ac105677
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-physicaldatareadpercent_92efc2ea-b6ed-41aa-921c-6d40e7b58c27.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Data IO percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "physical_data_read_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-sessionspercent_6b2e0ce9-d1b8-4061-b3ce-c39f9c5c1763.json b/services/Sql/servers/templates/arm/elasticpools-sessionspercent_6b2e0ce9-d1b8-4061-b3ce-c39f9c5c1763.json
new file mode 100644
index 000000000..f0cc02928
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-sessionspercent_6b2e0ce9-d1b8-4061-b3ce-c39f9c5c1763.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Sessions percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "sessions_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-sqlserverprocesscorepercent_73ec4301-872a-4bea-928e-420255aae8cb.json b/services/Sql/servers/templates/arm/elasticpools-sqlserverprocesscorepercent_73ec4301-872a-4bea-928e-420255aae8cb.json
new file mode 100644
index 000000000..1d2f90959
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-sqlserverprocesscorepercent_73ec4301-872a-4bea-928e-420255aae8cb.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU usage as a percentage of the SQL DB process. Applies to elastic pools. (This metric is equivalent to sql_instance_cpu_percent, and will be removed in the future.)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "95",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "sqlserver_process_core_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-sqlserverprocessmemorypercent_fa056aaf-57c4-4abe-9bc5-23ba413a1f5b.json b/services/Sql/servers/templates/arm/elasticpools-sqlserverprocessmemorypercent_fa056aaf-57c4-4abe-9bc5-23ba413a1f5b.json
new file mode 100644
index 000000000..b5ef183c2
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-sqlserverprocessmemorypercent_fa056aaf-57c4-4abe-9bc5-23ba413a1f5b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory usage as a percentage of the SQL DB process. Applies to elastic pools. (This metric is equivalent to sql_instance_memory_percent, and will be removed in the future.)",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "sqlserver_process_memory_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-storagepercent_88f3cbc0-bcfb-482f-b6f4-709a335afcad.json b/services/Sql/servers/templates/arm/elasticpools-storagepercent_88f3cbc0-bcfb-482f-b6f4-709a335afcad.json
new file mode 100644
index 000000000..b6bbb734d
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-storagepercent_88f3cbc0-bcfb-482f-b6f4-709a335afcad.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Data space used percent. Not applicable to hyperscale",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "storage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-tempdblogusedpercent_af66de51-079c-4d34-af92-f52f887642dc.json b/services/Sql/servers/templates/arm/elasticpools-tempdblogusedpercent_af66de51-079c-4d34-af92-f52f887642dc.json
new file mode 100644
index 000000000..29cfc6609
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-tempdblogusedpercent_af66de51-079c-4d34-af92-f52f887642dc.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Space used percentage in tempdb transaction log file",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "tempdb_log_used_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-workerspercent_1b37038e-6e5c-4463-97d4-8a632251d70e.json b/services/Sql/servers/templates/arm/elasticpools-workerspercent_1b37038e-6e5c-4463-97d4-8a632251d70e.json
new file mode 100644
index 000000000..bf1bb42f6
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-workerspercent_1b37038e-6e5c-4463-97d4-8a632251d70e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Workers percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "workers_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/arm/elasticpools-xtpstoragepercent_db517009-30ad-4cbc-b282-7f212052c3b4.json b/services/Sql/servers/templates/arm/elasticpools-xtpstoragepercent_db517009-30ad-4cbc-b282-7f212052c3b4.json
new file mode 100644
index 000000000..68ab0a9ae
--- /dev/null
+++ b/services/Sql/servers/templates/arm/elasticpools-xtpstoragepercent_db517009-30ad-4cbc-b282-7f212052c3b4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "In-Memory OLTP storage percent. Not applicable to hyperscale",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "xtp_storage_percent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Sql/servers/templates/bicep/databases-appcpupercent_05591510-5fe2-454a-96d8-bbda8201c6a4.bicep b/services/Sql/servers/templates/bicep/databases-appcpupercent_05591510-5fe2-454a-96d8-bbda8201c6a4.bicep
new file mode 100644
index 000000000..49ee776d8
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-appcpupercent_05591510-5fe2-454a-96d8-bbda8201c6a4.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'App CPU percentage. Applies to serverless databases.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'app_cpu_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-appmemorypercent_c5c95fe9-a4b4-4afa-a07a-a0d18804d416.bicep b/services/Sql/servers/templates/bicep/databases-appmemorypercent_c5c95fe9-a4b4-4afa-a07a-a0d18804d416.bicep
new file mode 100644
index 000000000..14490cedc
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-appmemorypercent_c5c95fe9-a4b4-4afa-a07a-a0d18804d416.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'App memory percentage. Applies to serverless databases.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'app_memory_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-blockedbyfirewall_2cda2f3a-8657-431a-a50f-56835aea9a81.bicep b/services/Sql/servers/templates/bicep/databases-blockedbyfirewall_2cda2f3a-8657-431a-a50f-56835aea9a81.bicep
new file mode 100644
index 000000000..3d702d3a5
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-blockedbyfirewall_2cda2f3a-8657-431a-a50f-56835aea9a81.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Blocked by Firewall'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'blocked_by_firewall'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-connectionfailed_7157dc17-9d5a-4835-a122-1d0d904d61ff.bicep b/services/Sql/servers/templates/bicep/databases-connectionfailed_7157dc17-9d5a-4835-a122-1d0d904d61ff.bicep
new file mode 100644
index 000000000..bec1b0b18
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-connectionfailed_7157dc17-9d5a-4835-a122-1d0d904d61ff.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed Connections'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'connection_failed'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-connectionfailedusererror_d528ffcb-3a99-4356-96d1-981499139ffb.bicep b/services/Sql/servers/templates/bicep/databases-connectionfailedusererror_d528ffcb-3a99-4356-96d1-981499139ffb.bicep
new file mode 100644
index 000000000..ba572297b
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-connectionfailedusererror_d528ffcb-3a99-4356-96d1-981499139ffb.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed Connections : User Errors'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'connection_failed_user_error'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-connectionsuccessful_460b6b29-a602-4409-b748-6b47b232a984.bicep b/services/Sql/servers/templates/bicep/databases-connectionsuccessful_460b6b29-a602-4409-b748-6b47b232a984.bicep
new file mode 100644
index 000000000..26401274a
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-connectionsuccessful_460b6b29-a602-4409-b748-6b47b232a984.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Successful Connections'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'LessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 5
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'connection_successful'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-cpuused_3ddd3f95-989c-4777-b6b8-728439aae1df.bicep b/services/Sql/servers/templates/bicep/databases-cpuused_3ddd3f95-989c-4777-b6b8-728439aae1df.bicep
new file mode 100644
index 000000000..5f51cefc0
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-cpuused_3ddd3f95-989c-4777-b6b8-728439aae1df.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU used. Applies to vCore-based databases.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cpu_used'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-deadlock_ce44fc81-3610-4165-a107-9dd4b8ab3972.bicep b/services/Sql/servers/templates/bicep/databases-deadlock_ce44fc81-3610-4165-a107-9dd4b8ab3972.bicep
new file mode 100644
index 000000000..90544b78a
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-deadlock_ce44fc81-3610-4165-a107-9dd4b8ab3972.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Deadlocks. Not applicable to data warehouses.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'deadlock'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-dtulimit_50124594-a291-4183-a8e3-195f5e6f5204.bicep b/services/Sql/servers/templates/bicep/databases-dtulimit_50124594-a291-4183-a8e3-195f5e6f5204.bicep
new file mode 100644
index 000000000..f761dcd7d
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-dtulimit_50124594-a291-4183-a8e3-195f5e6f5204.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'DTU Limit. Applies to DTU-based databases.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'dtu_limit'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-dtuused_d26f4c8b-0461-4c57-b230-cbd1a5424db1.bicep b/services/Sql/servers/templates/bicep/databases-dtuused_d26f4c8b-0461-4c57-b230-cbd1a5424db1.bicep
new file mode 100644
index 000000000..b6c2abba8
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-dtuused_d26f4c8b-0461-4c57-b230-cbd1a5424db1.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'DTU used. Applies to DTU-based databases.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'dtu_used'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-dwuconsumptionpercent_70f88865-7a8b-4e03-9252-a9369df503ef.bicep b/services/Sql/servers/templates/bicep/databases-dwuconsumptionpercent_70f88865-7a8b-4e03-9252-a9369df503ef.bicep
new file mode 100644
index 000000000..7b6e4d6f5
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-dwuconsumptionpercent_70f88865-7a8b-4e03-9252-a9369df503ef.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'DWU percentage. Applies only to data warehouses.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'dwu_consumption_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-memoryusagepercent_f5c13b49-8528-457d-9d7d-083b8433bf96.bicep b/services/Sql/servers/templates/bicep/databases-memoryusagepercent_f5c13b49-8528-457d-9d7d-083b8433bf96.bicep
new file mode 100644
index 000000000..d3f5af4cb
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-memoryusagepercent_f5c13b49-8528-457d-9d7d-083b8433bf96.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory percentage. Applies only to data warehouses.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'memory_usage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-sessionscount_07eeae07-010e-47ca-ad90-fa7adb5a6c52.bicep b/services/Sql/servers/templates/bicep/databases-sessionscount_07eeae07-010e-47ca-ad90-fa7adb5a6c52.bicep
new file mode 100644
index 000000000..63cce2644
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-sessionscount_07eeae07-010e-47ca-ad90-fa7adb5a6c52.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Number of active sessions. Not applicable to Synapse DW Analytics.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'sessions_count'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-sqlinstancecpupercent_1a8132b9-fbd2-4ac5-9e08-96358e16b7f7.bicep b/services/Sql/servers/templates/bicep/databases-sqlinstancecpupercent_1a8132b9-fbd2-4ac5-9e08-96358e16b7f7.bicep
new file mode 100644
index 000000000..b2ee846cd
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-sqlinstancecpupercent_1a8132b9-fbd2-4ac5-9e08-96358e16b7f7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU usage by all user and system workloads. Not applicable to data warehouses.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 70
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'sql_instance_cpu_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-sqlinstancememorypercent_f44a3cb0-6e99-4a5e-a691-c5d7d5bf7e64.bicep b/services/Sql/servers/templates/bicep/databases-sqlinstancememorypercent_f44a3cb0-6e99-4a5e-a691-c5d7d5bf7e64.bicep
new file mode 100644
index 000000000..473971b68
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-sqlinstancememorypercent_f44a3cb0-6e99-4a5e-a691-c5d7d5bf7e64.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory usage by the database engine instance. Not applicable to data warehouses.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'sql_instance_memory_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-storage_86922a27-41bb-4834-bc54-0b602b275597.bicep b/services/Sql/servers/templates/bicep/databases-storage_86922a27-41bb-4834-bc54-0b602b275597.bicep
new file mode 100644
index 000000000..0d11ddf39
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-storage_86922a27-41bb-4834-bc54-0b602b275597.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Data space used. Not applicable to data warehouses.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 934584883610
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'storage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/databases-tempdbdatasize_0fe27fd1-e4f7-48c1-bbd2-a6953755d5e8.bicep b/services/Sql/servers/templates/bicep/databases-tempdbdatasize_0fe27fd1-e4f7-48c1-bbd2-a6953755d5e8.bicep
new file mode 100644
index 000000000..c52441e18
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/databases-tempdbdatasize_0fe27fd1-e4f7-48c1-bbd2-a6953755d5e8.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Space used in tempdb data files in kilobytes. Not applicable to data warehouses.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'tempdb_data_size'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-allocateddatastorage_3743016a-a056-43fe-b53a-36dd9a17626d.bicep b/services/Sql/servers/templates/bicep/elasticpools-allocateddatastorage_3743016a-a056-43fe-b53a-36dd9a17626d.bicep
new file mode 100644
index 000000000..8abbd64a8
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-allocateddatastorage_3743016a-a056-43fe-b53a-36dd9a17626d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Data space allocated. Not applicable to hyperscale'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 225000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'allocated_data_storage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-allocateddatastoragepercent_7e9d0710-3243-4cf2-8b73-6be1539b8545.bicep b/services/Sql/servers/templates/bicep/elasticpools-allocateddatastoragepercent_7e9d0710-3243-4cf2-8b73-6be1539b8545.bicep
new file mode 100644
index 000000000..1886f8f7e
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-allocateddatastoragepercent_7e9d0710-3243-4cf2-8b73-6be1539b8545.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Data space allocated percent. Not applicable to hyperscale'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'allocated_data_storage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-cpupercent_805c4ae5-a852-43bd-ad1c-0f7f381d8f32.bicep b/services/Sql/servers/templates/bicep/elasticpools-cpupercent_805c4ae5-a852-43bd-ad1c-0f7f381d8f32.bicep
new file mode 100644
index 000000000..c45db599a
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-cpupercent_805c4ae5-a852-43bd-ad1c-0f7f381d8f32.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU percentage'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'cpu_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-dtuconsumptionpercent_5d9075b5-3c19-4cf6-9c2e-50ba4c175691.bicep b/services/Sql/servers/templates/bicep/elasticpools-dtuconsumptionpercent_5d9075b5-3c19-4cf6-9c2e-50ba4c175691.bicep
new file mode 100644
index 000000000..03ebef8f7
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-dtuconsumptionpercent_5d9075b5-3c19-4cf6-9c2e-50ba4c175691.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'DTU Percentage. Applies to DTU-based elastic pools.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'dtu_consumption_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-eDTUused_16a64053-1905-4d8e-8198-810584cad108.bicep b/services/Sql/servers/templates/bicep/elasticpools-eDTUused_16a64053-1905-4d8e-8198-810584cad108.bicep
new file mode 100644
index 000000000..efc10ad98
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-eDTUused_16a64053-1905-4d8e-8198-810584cad108.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'eDTU used. Applies to DTU-based elastic pools.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'eDTU_used'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-logwritepercent_47cd814e-1991-437e-8feb-e589a250d2a3.bicep b/services/Sql/servers/templates/bicep/elasticpools-logwritepercent_47cd814e-1991-437e-8feb-e589a250d2a3.bicep
new file mode 100644
index 000000000..2b2a29cde
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-logwritepercent_47cd814e-1991-437e-8feb-e589a250d2a3.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Log IO percentage'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'log_write_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-physicaldatareadpercent_92efc2ea-b6ed-41aa-921c-6d40e7b58c27.bicep b/services/Sql/servers/templates/bicep/elasticpools-physicaldatareadpercent_92efc2ea-b6ed-41aa-921c-6d40e7b58c27.bicep
new file mode 100644
index 000000000..f9d067583
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-physicaldatareadpercent_92efc2ea-b6ed-41aa-921c-6d40e7b58c27.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Data IO percentage'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'physical_data_read_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-sessionspercent_6b2e0ce9-d1b8-4061-b3ce-c39f9c5c1763.bicep b/services/Sql/servers/templates/bicep/elasticpools-sessionspercent_6b2e0ce9-d1b8-4061-b3ce-c39f9c5c1763.bicep
new file mode 100644
index 000000000..7cfe97d09
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-sessionspercent_6b2e0ce9-d1b8-4061-b3ce-c39f9c5c1763.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Sessions percentage'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'sessions_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-sqlserverprocesscorepercent_73ec4301-872a-4bea-928e-420255aae8cb.bicep b/services/Sql/servers/templates/bicep/elasticpools-sqlserverprocesscorepercent_73ec4301-872a-4bea-928e-420255aae8cb.bicep
new file mode 100644
index 000000000..795e41bc8
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-sqlserverprocesscorepercent_73ec4301-872a-4bea-928e-420255aae8cb.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU usage as a percentage of the SQL DB process. Applies to elastic pools. (This metric is equivalent to sql_instance_cpu_percent, and will be removed in the future.)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 95
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'sqlserver_process_core_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-sqlserverprocessmemorypercent_fa056aaf-57c4-4abe-9bc5-23ba413a1f5b.bicep b/services/Sql/servers/templates/bicep/elasticpools-sqlserverprocessmemorypercent_fa056aaf-57c4-4abe-9bc5-23ba413a1f5b.bicep
new file mode 100644
index 000000000..f01fd913c
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-sqlserverprocessmemorypercent_fa056aaf-57c4-4abe-9bc5-23ba413a1f5b.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory usage as a percentage of the SQL DB process. Applies to elastic pools. (This metric is equivalent to sql_instance_memory_percent, and will be removed in the future.)'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'sqlserver_process_memory_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-storagepercent_88f3cbc0-bcfb-482f-b6f4-709a335afcad.bicep b/services/Sql/servers/templates/bicep/elasticpools-storagepercent_88f3cbc0-bcfb-482f-b6f4-709a335afcad.bicep
new file mode 100644
index 000000000..3cdaffe40
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-storagepercent_88f3cbc0-bcfb-482f-b6f4-709a335afcad.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Data space used percent. Not applicable to hyperscale'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'storage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-tempdblogusedpercent_af66de51-079c-4d34-af92-f52f887642dc.bicep b/services/Sql/servers/templates/bicep/elasticpools-tempdblogusedpercent_af66de51-079c-4d34-af92-f52f887642dc.bicep
new file mode 100644
index 000000000..e6848cd1e
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-tempdblogusedpercent_af66de51-079c-4d34-af92-f52f887642dc.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Space used percentage in tempdb transaction log file'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'tempdb_log_used_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-workerspercent_1b37038e-6e5c-4463-97d4-8a632251d70e.bicep b/services/Sql/servers/templates/bicep/elasticpools-workerspercent_1b37038e-6e5c-4463-97d4-8a632251d70e.bicep
new file mode 100644
index 000000000..3751d6242
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-workerspercent_1b37038e-6e5c-4463-97d4-8a632251d70e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Workers percentage'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'workers_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Sql/servers/templates/bicep/elasticpools-xtpstoragepercent_db517009-30ad-4cbc-b282-7f212052c3b4.bicep b/services/Sql/servers/templates/bicep/elasticpools-xtpstoragepercent_db517009-30ad-4cbc-b282-7f212052c3b4.bicep
new file mode 100644
index 000000000..2ba14ce38
--- /dev/null
+++ b/services/Sql/servers/templates/bicep/elasticpools-xtpstoragepercent_db517009-30ad-4cbc-b282-7f212052c3b4.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'In-Memory OLTP storage percent. Not applicable to hyperscale'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'xtp_storage_percent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/Deploy-ActivityLog-SA-Delete-Alert.json b/services/Storage/storageAccounts/Deploy-ActivityLog-SA-Delete-Alert.json
index bbe58be65..c0d196c94 100644
--- a/services/Storage/storageAccounts/Deploy-ActivityLog-SA-Delete-Alert.json
+++ b/services/Storage/storageAccounts/Deploy-ActivityLog-SA-Delete-Alert.json
@@ -8,7 +8,7 @@
"displayName": "Deploy Activity Log Storage Account Delete Alert",
"description": "Policy to Deploy Activity Log Storage Account Delete Alert",
"metadata": {
- "version": "1.2.0",
+ "version": "1.3.0",
"category": "Monitoring",
"source": "https://github.com/Azure/azure-monitor-baseline-alerts/",
"alzCloudEnvironments": [
@@ -35,7 +35,7 @@
"displayName": "Resource Group Name",
"description": "Resource group the alert is placed in"
},
- "defaultValue": "rg-amba-monitoring-001"
+ "defaultValue": "rg-amba-monitoring-002"
},
"alertResourceGroupTags": {
"type": "Object",
diff --git a/services/Storage/storageAccounts/templates/arm/Availability_b1a4849b-78a8-437f-8113-7c6f2dc34927.json b/services/Storage/storageAccounts/templates/arm/Availability_b1a4849b-78a8-437f-8113-7c6f2dc34927.json
new file mode 100644
index 000000000..22c1bc480
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/Availability_b1a4849b-78a8-437f-8113-7c6f2dc34927.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of availability for the storage service or the specified API operation. Availability is calculated by taking the TotalBillableRequests value and dividing it by the number of applicable requests, including those that produced unexpected errors. All unexpected errors result in reduced availability for the storage service or the specified API operation.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Availability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/Egress_eb186756-b63b-408a-bbaf-ac94c1010287.json b/services/Storage/storageAccounts/templates/arm/Egress_eb186756-b63b-408a-bbaf-ac94c1010287.json
new file mode 100644
index 000000000..d96c771e5
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/Egress_eb186756-b63b-408a-bbaf-ac94c1010287.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of egress data. This number includes egress to external client from Azure Storage as well as egress within Azure. As a result, this number does not reflect billable egress.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "60000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Egress",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/FileShareCount_a4adc774-7ca4-4a4b-b2fa-514b9fcbbc80.json b/services/Storage/storageAccounts/templates/arm/FileShareCount_a4adc774-7ca4-4a4b-b2fa-514b9fcbbc80.json
new file mode 100644
index 000000000..dc38af8d8
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/FileShareCount_a4adc774-7ca4-4a4b-b2fa-514b9fcbbc80.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of file shares in the storage account.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FileShareCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/Ingress_5d872cb4-7f71-4275-81eb-98c968c0cadd.json b/services/Storage/storageAccounts/templates/arm/Ingress_5d872cb4-7f71-4275-81eb-98c968c0cadd.json
new file mode 100644
index 000000000..d690ee29c
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/Ingress_5d872cb4-7f71-4275-81eb-98c968c0cadd.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of ingress data, in bytes. This number includes ingress from an external client into Azure Storage as well as ingress within Azure.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1073741824",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Ingress",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/QueueCount_f75dec98-78a3-4e42-954d-375fe3352857.json b/services/Storage/storageAccounts/templates/arm/QueueCount_f75dec98-78a3-4e42-954d-375fe3352857.json
new file mode 100644
index 000000000..f8f5bb7c8
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/QueueCount_f75dec98-78a3-4e42-954d-375fe3352857.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of queues in the storage account.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "QueueCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/Throttling_5e544473-d84f-427d-869d-9d982619e4cb.json b/services/Storage/storageAccounts/templates/arm/Throttling_5e544473-d84f-427d-869d-9d982619e4cb.json
new file mode 100644
index 000000000..2efa042cf
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/Throttling_5e544473-d84f-427d-869d-9d982619e4cb.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The storage account will be throttled if throughput exceeds the account's tier limit. Increasing the file share or storage tier may be necessary.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Transactions",
+ "dimensions": [{"name": "ResponseType", "operator": "Include", "values": ["SuccessWithThrottling SuccessWithShareIopsThrottling ClientShareIopsThrottlingError"]}, {"name": "FileShare", "operator": "Include", "values": ["SuccessWithShareEgressThrottling SuccessWithShareIngressThrottling SuccessWithShareIopsThrottling ClientShareEgressThrottlingError ClientShareIngressThrottlingError ClientShareIopsThrottlingError"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/UsedCapacity_b663a689-6db8-467d-8b5d-8cd34afe4b0e.json b/services/Storage/storageAccounts/templates/arm/UsedCapacity_b663a689-6db8-467d-8b5d-8cd34afe4b0e.json
new file mode 100644
index 000000000..e8af7a0f5
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/UsedCapacity_b663a689-6db8-467d-8b5d-8cd34afe4b0e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of storage used by the storage account. For standard storage accounts, it's the sum of capacity used by blob, table, file, and queue. For premium storage accounts and Blob storage accounts, it is the same as BlobCapacity or FileCapacity.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2251800000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "UsedCapacity",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/blobServices-BlobCapacity_8c0aaea9-bcce-4c27-a090-ffe54b7e1d1c.json b/services/Storage/storageAccounts/templates/arm/blobServices-BlobCapacity_8c0aaea9-bcce-4c27-a090-ffe54b7e1d1c.json
new file mode 100644
index 000000000..fb80807e4
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/blobServices-BlobCapacity_8c0aaea9-bcce-4c27-a090-ffe54b7e1d1c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of storage used by the storage account's Blob service in bytes.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "107374182400",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "P1D",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BlobCapacity",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/blobServices-BlobCount_c4d93fac-a6b6-4731-a92a-c499b6fb2bcb.json b/services/Storage/storageAccounts/templates/arm/blobServices-BlobCount_c4d93fac-a6b6-4731-a92a-c499b6fb2bcb.json
new file mode 100644
index 000000000..cafe2da76
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/blobServices-BlobCount_c4d93fac-a6b6-4731-a92a-c499b6fb2bcb.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of blob objects stored in the storage account.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BlobCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/blobServices-SuccessE2ELatency_0acc30dc-881d-46c9-b634-8cba507a263f.json b/services/Storage/storageAccounts/templates/arm/blobServices-SuccessE2ELatency_0acc30dc-881d-46c9-b634-8cba507a263f.json
new file mode 100644
index 000000000..1154f3abc
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/blobServices-SuccessE2ELatency_0acc30dc-881d-46c9-b634-8cba507a263f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average end-to-end latency of successful requests made to a storage service or the specified API operation, in milliseconds. This value includes the required processing time within Azure Storage to read the request, send the response, and receive acknowledgment of the response.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SuccessE2ELatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/blobServices-SuccessServerLatency_0a3689c7-b610-4c52-ae84-ab0640f3d6e4.json b/services/Storage/storageAccounts/templates/arm/blobServices-SuccessServerLatency_0a3689c7-b610-4c52-ae84-ab0640f3d6e4.json
new file mode 100644
index 000000000..3b5ba6906
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/blobServices-SuccessServerLatency_0a3689c7-b610-4c52-ae84-ab0640f3d6e4.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average time used to process a successful request by Azure Storage. This value does not include the network latency specified in SuccessE2ELatency.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SuccessServerLatency",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/fileServices-Availability_45fef979-c27e-425a-a6c3-e5bd28b1eb86.json b/services/Storage/storageAccounts/templates/arm/fileServices-Availability_45fef979-c27e-425a-a6c3-e5bd28b1eb86.json
new file mode 100644
index 000000000..9691a2ebc
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/fileServices-Availability_45fef979-c27e-425a-a6c3-e5bd28b1eb86.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The percentage of availability for the storage service or the specified API operation. Availability is calculated by taking the TotalBillableRequests value and dividing it by the number of applicable requests, including those that produced unexpected errors. All unexpected errors result in reduced availability for the storage service or the specified API operation.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Availability",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/fileServices-FileCapacity_26e09eae-c784-4e8f-a225-d3f13efff76f.json b/services/Storage/storageAccounts/templates/arm/fileServices-FileCapacity_26e09eae-c784-4e8f-a225-d3f13efff76f.json
new file mode 100644
index 000000000..deaebaabc
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/fileServices-FileCapacity_26e09eae-c784-4e8f-a225-d3f13efff76f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of File storage used by the storage account.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "96636764160",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FileCapacity",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/fileServices-FileShareCapacityQuota_8660f357-83f9-4719-bdf3-bae57af2d967.json b/services/Storage/storageAccounts/templates/arm/fileServices-FileShareCapacityQuota_8660f357-83f9-4719-bdf3-bae57af2d967.json
new file mode 100644
index 000000000..b77a40bb0
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/fileServices-FileShareCapacityQuota_8660f357-83f9-4719-bdf3-bae57af2d967.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The upper limit on the amount of storage that can be used by Azure Files Service in bytes.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5222680231936",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FileShareCapacityQuota",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/fileServices-FileShareSnapshotCount_8cbe449d-9264-4ae1-8221-5d97989005a8.json b/services/Storage/storageAccounts/templates/arm/fileServices-FileShareSnapshotCount_8cbe449d-9264-4ae1-8221-5d97989005a8.json
new file mode 100644
index 000000000..fbcb7aea0
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/fileServices-FileShareSnapshotCount_8cbe449d-9264-4ae1-8221-5d97989005a8.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of snapshots present on the share in storage account's Files Service.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "190",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FileShareSnapshotCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/fileServices-Transactions_c81d3e6c-5539-42ad-a95f-9bba504d91f0.json b/services/Storage/storageAccounts/templates/arm/fileServices-Transactions_c81d3e6c-5539-42ad-a95f-9bba504d91f0.json
new file mode 100644
index 000000000..50a716129
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/fileServices-Transactions_c81d3e6c-5539-42ad-a95f-9bba504d91f0.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of requests made to a storage service or the specified API operation. This number includes successful and failed requests, as well as requests which produced errors. Use ResponseType dimension for the number of different type of response.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Transactions",
+ "dimensions": [{"operator": "include", "name": "responsetype", "values": ["success"]}, {"operator": "include", "name": "authentication", "values": ["anonymous"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/queueServices-QueueCapacity_7815fc6f-bfb1-4474-9ea6-05e1449a2ed5.json b/services/Storage/storageAccounts/templates/arm/queueServices-QueueCapacity_7815fc6f-bfb1-4474-9ea6-05e1449a2ed5.json
new file mode 100644
index 000000000..c7e8acce7
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/queueServices-QueueCapacity_7815fc6f-bfb1-4474-9ea6-05e1449a2ed5.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of Queue storage used by the storage account.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "31457280",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "QueueCapacity",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/arm/queueServices-QueueMessageCount_34769aaa-5014-4ced-bb08-9fabfba3d959.json b/services/Storage/storageAccounts/templates/arm/queueServices-QueueMessageCount_34769aaa-5014-4ced-bb08-9fabfba3d959.json
new file mode 100644
index 000000000..e93032ae6
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/arm/queueServices-QueueMessageCount_34769aaa-5014-4ced-bb08-9fabfba3d959.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of unexpired queue messages in the storage account.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "QueueMessageCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/Availability_b1a4849b-78a8-437f-8113-7c6f2dc34927.bicep b/services/Storage/storageAccounts/templates/bicep/Availability_b1a4849b-78a8-437f-8113-7c6f2dc34927.bicep
new file mode 100644
index 000000000..efb5b159b
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/Availability_b1a4849b-78a8-437f-8113-7c6f2dc34927.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of availability for the storage service or the specified API operation. Availability is calculated by taking the TotalBillableRequests value and dividing it by the number of applicable requests, including those that produced unexpected errors. All unexpected errors result in reduced availability for the storage service or the specified API operation.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Availability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/Egress_eb186756-b63b-408a-bbaf-ac94c1010287.bicep b/services/Storage/storageAccounts/templates/bicep/Egress_eb186756-b63b-408a-bbaf-ac94c1010287.bicep
new file mode 100644
index 000000000..bcf88ac45
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/Egress_eb186756-b63b-408a-bbaf-ac94c1010287.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of egress data. This number includes egress to external client from Azure Storage as well as egress within Azure. As a result, this number does not reflect billable egress.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 60000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Egress'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/FileShareCount_a4adc774-7ca4-4a4b-b2fa-514b9fcbbc80.bicep b/services/Storage/storageAccounts/templates/bicep/FileShareCount_a4adc774-7ca4-4a4b-b2fa-514b9fcbbc80.bicep
new file mode 100644
index 000000000..39c7fb785
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/FileShareCount_a4adc774-7ca4-4a4b-b2fa-514b9fcbbc80.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of file shares in the storage account.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FileShareCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/Ingress_5d872cb4-7f71-4275-81eb-98c968c0cadd.bicep b/services/Storage/storageAccounts/templates/bicep/Ingress_5d872cb4-7f71-4275-81eb-98c968c0cadd.bicep
new file mode 100644
index 000000000..76ec261ce
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/Ingress_5d872cb4-7f71-4275-81eb-98c968c0cadd.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of ingress data, in bytes. This number includes ingress from an external client into Azure Storage as well as ingress within Azure.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1073741824
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Ingress'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/QueueCount_f75dec98-78a3-4e42-954d-375fe3352857.bicep b/services/Storage/storageAccounts/templates/bicep/QueueCount_f75dec98-78a3-4e42-954d-375fe3352857.bicep
new file mode 100644
index 000000000..1fffabbe1
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/QueueCount_f75dec98-78a3-4e42-954d-375fe3352857.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of queues in the storage account.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'QueueCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/Throttling_5e544473-d84f-427d-869d-9d982619e4cb.bicep b/services/Storage/storageAccounts/templates/bicep/Throttling_5e544473-d84f-427d-869d-9d982619e4cb.bicep
new file mode 100644
index 000000000..1a79793b3
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/Throttling_5e544473-d84f-427d-869d-9d982619e4cb.bicep
@@ -0,0 +1,145 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The storage account will be throttled if throughput exceeds the account's tier limit. Increasing the file share or storage tier may be necessary.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Transactions'
+ dimensions: [
+ {
+ name: 'ResponseType'
+ operator: 'Include'
+ values: ['SuccessWithThrottling SuccessWithShareIopsThrottling ClientShareIopsThrottlingError']
+ }
+ {
+ name: 'FileShare'
+ operator: 'Include'
+ values: ['SuccessWithShareEgressThrottling SuccessWithShareIngressThrottling SuccessWithShareIopsThrottling ClientShareEgressThrottlingError ClientShareIngressThrottlingError ClientShareIopsThrottlingError']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/UsedCapacity_b663a689-6db8-467d-8b5d-8cd34afe4b0e.bicep b/services/Storage/storageAccounts/templates/bicep/UsedCapacity_b663a689-6db8-467d-8b5d-8cd34afe4b0e.bicep
new file mode 100644
index 000000000..f22297c45
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/UsedCapacity_b663a689-6db8-467d-8b5d-8cd34afe4b0e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of storage used by the storage account. For standard storage accounts, it's the sum of capacity used by blob, table, file, and queue. For premium storage accounts and Blob storage accounts, it is the same as BlobCapacity or FileCapacity.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2251800000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'UsedCapacity'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/blobServices-BlobCapacity_8c0aaea9-bcce-4c27-a090-ffe54b7e1d1c.bicep b/services/Storage/storageAccounts/templates/bicep/blobServices-BlobCapacity_8c0aaea9-bcce-4c27-a090-ffe54b7e1d1c.bicep
new file mode 100644
index 000000000..66739ac1c
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/blobServices-BlobCapacity_8c0aaea9-bcce-4c27-a090-ffe54b7e1d1c.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of storage used by the storage account's Blob service in bytes.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 107374182400
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'P1D'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BlobCapacity'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/blobServices-BlobCount_c4d93fac-a6b6-4731-a92a-c499b6fb2bcb.bicep b/services/Storage/storageAccounts/templates/bicep/blobServices-BlobCount_c4d93fac-a6b6-4731-a92a-c499b6fb2bcb.bicep
new file mode 100644
index 000000000..e76433399
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/blobServices-BlobCount_c4d93fac-a6b6-4731-a92a-c499b6fb2bcb.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of blob objects stored in the storage account.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BlobCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/blobServices-SuccessE2ELatency_0acc30dc-881d-46c9-b634-8cba507a263f.bicep b/services/Storage/storageAccounts/templates/bicep/blobServices-SuccessE2ELatency_0acc30dc-881d-46c9-b634-8cba507a263f.bicep
new file mode 100644
index 000000000..6fec2259c
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/blobServices-SuccessE2ELatency_0acc30dc-881d-46c9-b634-8cba507a263f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average end-to-end latency of successful requests made to a storage service or the specified API operation, in milliseconds. This value includes the required processing time within Azure Storage to read the request, send the response, and receive acknowledgment of the response.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SuccessE2ELatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/blobServices-SuccessServerLatency_0a3689c7-b610-4c52-ae84-ab0640f3d6e4.bicep b/services/Storage/storageAccounts/templates/bicep/blobServices-SuccessServerLatency_0a3689c7-b610-4c52-ae84-ab0640f3d6e4.bicep
new file mode 100644
index 000000000..b186e0938
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/blobServices-SuccessServerLatency_0a3689c7-b610-4c52-ae84-ab0640f3d6e4.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average time used to process a successful request by Azure Storage. This value does not include the network latency specified in SuccessE2ELatency.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SuccessServerLatency'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/fileServices-Availability_45fef979-c27e-425a-a6c3-e5bd28b1eb86.bicep b/services/Storage/storageAccounts/templates/bicep/fileServices-Availability_45fef979-c27e-425a-a6c3-e5bd28b1eb86.bicep
new file mode 100644
index 000000000..fc9f56d44
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/fileServices-Availability_45fef979-c27e-425a-a6c3-e5bd28b1eb86.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The percentage of availability for the storage service or the specified API operation. Availability is calculated by taking the TotalBillableRequests value and dividing it by the number of applicable requests, including those that produced unexpected errors. All unexpected errors result in reduced availability for the storage service or the specified API operation.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Availability'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/fileServices-FileCapacity_26e09eae-c784-4e8f-a225-d3f13efff76f.bicep b/services/Storage/storageAccounts/templates/bicep/fileServices-FileCapacity_26e09eae-c784-4e8f-a225-d3f13efff76f.bicep
new file mode 100644
index 000000000..d64d7174c
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/fileServices-FileCapacity_26e09eae-c784-4e8f-a225-d3f13efff76f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of File storage used by the storage account.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 96636764160
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FileCapacity'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/fileServices-FileShareCapacityQuota_8660f357-83f9-4719-bdf3-bae57af2d967.bicep b/services/Storage/storageAccounts/templates/bicep/fileServices-FileShareCapacityQuota_8660f357-83f9-4719-bdf3-bae57af2d967.bicep
new file mode 100644
index 000000000..b1155469f
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/fileServices-FileShareCapacityQuota_8660f357-83f9-4719-bdf3-bae57af2d967.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The upper limit on the amount of storage that can be used by Azure Files Service in bytes.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5222680231936
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FileShareCapacityQuota'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/fileServices-FileShareSnapshotCount_8cbe449d-9264-4ae1-8221-5d97989005a8.bicep b/services/Storage/storageAccounts/templates/bicep/fileServices-FileShareSnapshotCount_8cbe449d-9264-4ae1-8221-5d97989005a8.bicep
new file mode 100644
index 000000000..cb8d4ff19
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/fileServices-FileShareSnapshotCount_8cbe449d-9264-4ae1-8221-5d97989005a8.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of snapshots present on the share in storage account's Files Service.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 190
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FileShareSnapshotCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/fileServices-Transactions_c81d3e6c-5539-42ad-a95f-9bba504d91f0.bicep b/services/Storage/storageAccounts/templates/bicep/fileServices-Transactions_c81d3e6c-5539-42ad-a95f-9bba504d91f0.bicep
new file mode 100644
index 000000000..af6dd4665
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/fileServices-Transactions_c81d3e6c-5539-42ad-a95f-9bba504d91f0.bicep
@@ -0,0 +1,145 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of requests made to a storage service or the specified API operation. This number includes successful and failed requests, as well as requests which produced errors. Use ResponseType dimension for the number of different type of response.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Transactions'
+ dimensions: [
+ {
+ name: 'responsetype'
+ operator: 'include'
+ values: ['success']
+ }
+ {
+ name: 'authentication'
+ operator: 'include'
+ values: ['anonymous']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/queueServices-QueueCapacity_7815fc6f-bfb1-4474-9ea6-05e1449a2ed5.bicep b/services/Storage/storageAccounts/templates/bicep/queueServices-QueueCapacity_7815fc6f-bfb1-4474-9ea6-05e1449a2ed5.bicep
new file mode 100644
index 000000000..5fa5a77f4
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/queueServices-QueueCapacity_7815fc6f-bfb1-4474-9ea6-05e1449a2ed5.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of Queue storage used by the storage account.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 31457280
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'QueueCapacity'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Storage/storageAccounts/templates/bicep/queueServices-QueueMessageCount_34769aaa-5014-4ced-bb08-9fabfba3d959.bicep b/services/Storage/storageAccounts/templates/bicep/queueServices-QueueMessageCount_34769aaa-5014-4ced-bb08-9fabfba3d959.bicep
new file mode 100644
index 000000000..9590bd130
--- /dev/null
+++ b/services/Storage/storageAccounts/templates/bicep/queueServices-QueueMessageCount_34769aaa-5014-4ced-bb08-9fabfba3d959.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of unexpired queue messages in the storage account.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'QueueMessageCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StorageCache/caches/templates/arm/Uptime_7f951991-c6ce-4c72-9f55-7eade2c4f57c.json b/services/StorageCache/caches/templates/arm/Uptime_7f951991-c6ce-4c72-9f55-7eade2c4f57c.json
new file mode 100644
index 000000000..c174a96c2
--- /dev/null
+++ b/services/StorageCache/caches/templates/arm/Uptime_7f951991-c6ce-4c72-9f55-7eade2c4f57c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Total number of client input/output operations per second",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "99",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Uptime",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StorageCache/caches/templates/bicep/Uptime_7f951991-c6ce-4c72-9f55-7eade2c4f57c.bicep b/services/StorageCache/caches/templates/bicep/Uptime_7f951991-c6ce-4c72-9f55-7eade2c4f57c.bicep
new file mode 100644
index 000000000..fd041082f
--- /dev/null
+++ b/services/StorageCache/caches/templates/bicep/Uptime_7f951991-c6ce-4c72-9f55-7eade2c4f57c.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Total number of client input/output operations per second'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 99
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Uptime'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StorageSync/storageSyncServices/templates/arm/ServerSyncSessionResult_ea68cbf2-b8a6-4f47-afda-94cab9ce4622.json b/services/StorageSync/storageSyncServices/templates/arm/ServerSyncSessionResult_ea68cbf2-b8a6-4f47-afda-94cab9ce4622.json
new file mode 100644
index 000000000..1a53152ff
--- /dev/null
+++ b/services/StorageSync/storageSyncServices/templates/arm/ServerSyncSessionResult_ea68cbf2-b8a6-4f47-afda-94cab9ce4622.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric that logs a value of 1 each time the Server Endpoint successfully completes a Sync Session with the Cloud Endpoint",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "P1D",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ServerSyncSessionResult",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StorageSync/storageSyncServices/templates/arm/StorageSyncServerHeartbeat_eb627157-b9c8-4e8f-a00e-f9eb7df45c78.json b/services/StorageSync/storageSyncServices/templates/arm/StorageSyncServerHeartbeat_eb627157-b9c8-4e8f-a00e-f9eb7df45c78.json
new file mode 100644
index 000000000..659d551fe
--- /dev/null
+++ b/services/StorageSync/storageSyncServices/templates/arm/StorageSyncServerHeartbeat_eb627157-b9c8-4e8f-a00e-f9eb7df45c78.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Metric that logs a value of 1 each time the resigtered server successfully records a heartbeat with the Cloud Endpoint",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "StorageSyncServerHeartbeat",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StorageSync/storageSyncServices/templates/arm/StorageSyncSyncSessionPerItemErrorsCount_0020bd6d-cd35-491e-9c71-f66bd64ed9a9.json b/services/StorageSync/storageSyncServices/templates/arm/StorageSyncSyncSessionPerItemErrorsCount_0020bd6d-cd35-491e-9c71-f66bd64ed9a9.json
new file mode 100644
index 000000000..a9e620684
--- /dev/null
+++ b/services/StorageSync/storageSyncServices/templates/arm/StorageSyncSyncSessionPerItemErrorsCount_0020bd6d-cd35-491e-9c71-f66bd64ed9a9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of files failed to sync",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "StorageSyncSyncSessionPerItemErrorsCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StorageSync/storageSyncServices/templates/bicep/ServerSyncSessionResult_ea68cbf2-b8a6-4f47-afda-94cab9ce4622.bicep b/services/StorageSync/storageSyncServices/templates/bicep/ServerSyncSessionResult_ea68cbf2-b8a6-4f47-afda-94cab9ce4622.bicep
new file mode 100644
index 000000000..12c0b141c
--- /dev/null
+++ b/services/StorageSync/storageSyncServices/templates/bicep/ServerSyncSessionResult_ea68cbf2-b8a6-4f47-afda-94cab9ce4622.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric that logs a value of 1 each time the Server Endpoint successfully completes a Sync Session with the Cloud Endpoint'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'P1D'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ServerSyncSessionResult'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StorageSync/storageSyncServices/templates/bicep/StorageSyncServerHeartbeat_eb627157-b9c8-4e8f-a00e-f9eb7df45c78.bicep b/services/StorageSync/storageSyncServices/templates/bicep/StorageSyncServerHeartbeat_eb627157-b9c8-4e8f-a00e-f9eb7df45c78.bicep
new file mode 100644
index 000000000..bc0d6b5e6
--- /dev/null
+++ b/services/StorageSync/storageSyncServices/templates/bicep/StorageSyncServerHeartbeat_eb627157-b9c8-4e8f-a00e-f9eb7df45c78.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Metric that logs a value of 1 each time the resigtered server successfully records a heartbeat with the Cloud Endpoint'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT30M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'StorageSyncServerHeartbeat'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StorageSync/storageSyncServices/templates/bicep/StorageSyncSyncSessionPerItemErrorsCount_0020bd6d-cd35-491e-9c71-f66bd64ed9a9.bicep b/services/StorageSync/storageSyncServices/templates/bicep/StorageSyncSyncSessionPerItemErrorsCount_0020bd6d-cd35-491e-9c71-f66bd64ed9a9.bicep
new file mode 100644
index 000000000..48fc402c5
--- /dev/null
+++ b/services/StorageSync/storageSyncServices/templates/bicep/StorageSyncSyncSessionPerItemErrorsCount_0020bd6d-cd35-491e-9c71-f66bd64ed9a9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of files failed to sync'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'StorageSyncSyncSessionPerItemErrorsCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/arm/AMLCalloutFailedRequests_f0fa5804-9d5f-4e23-91c0-996c561585ef.json b/services/StreamAnalytics/streamingjobs/templates/arm/AMLCalloutFailedRequests_f0fa5804-9d5f-4e23-91c0-996c561585ef.json
new file mode 100644
index 000000000..f604d592c
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/arm/AMLCalloutFailedRequests_f0fa5804-9d5f-4e23-91c0-996c561585ef.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Failed Function Requests",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "AMLCalloutFailedRequests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/arm/ConversionErrors_7d30aeb3-31e5-4742-aa7e-825c2a6af42a.json b/services/StreamAnalytics/streamingjobs/templates/arm/ConversionErrors_7d30aeb3-31e5-4742-aa7e-825c2a6af42a.json
new file mode 100644
index 000000000..966f1755c
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/arm/ConversionErrors_7d30aeb3-31e5-4742-aa7e-825c2a6af42a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Data Conversion Errors",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ConversionErrors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/arm/DeserializationError_381221db-fd9a-4d65-a16f-63e7492b0a49.json b/services/StreamAnalytics/streamingjobs/templates/arm/DeserializationError_381221db-fd9a-4d65-a16f-63e7492b0a49.json
new file mode 100644
index 000000000..b77b7fd13
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/arm/DeserializationError_381221db-fd9a-4d65-a16f-63e7492b0a49.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Input Deserialization Errors",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DeserializationError",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/arm/Errors_ebd9a9cf-7aa1-4c75-8b76-33f94e4bb8ef.json b/services/StreamAnalytics/streamingjobs/templates/arm/Errors_ebd9a9cf-7aa1-4c75-8b76-33f94e4bb8ef.json
new file mode 100644
index 000000000..c0dc6bc12
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/arm/Errors_ebd9a9cf-7aa1-4c75-8b76-33f94e4bb8ef.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Runtime Errors",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Errors",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/arm/InputEventsSourcesBacklogged_b46ef7a9-6597-4c4f-a5ca-9ca653e1b716.json b/services/StreamAnalytics/streamingjobs/templates/arm/InputEventsSourcesBacklogged_b46ef7a9-6597-4c4f-a5ca-9ca653e1b716.json
new file mode 100644
index 000000000..4f3e603df
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/arm/InputEventsSourcesBacklogged_b46ef7a9-6597-4c4f-a5ca-9ca653e1b716.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Backlogged Input Events",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "InputEventsSourcesBacklogged",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/arm/InputEvents_1dc8c746-4caf-4355-9d82-bdeaa1cf95bf.json b/services/StreamAnalytics/streamingjobs/templates/arm/InputEvents_1dc8c746-4caf-4355-9d82-bdeaa1cf95bf.json
new file mode 100644
index 000000000..e7972c02f
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/arm/InputEvents_1dc8c746-4caf-4355-9d82-bdeaa1cf95bf.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Input Events",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "InputEvents",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/arm/OutputEvents_c0dbcbee-eefd-4ee4-bd25-48d42444c882.json b/services/StreamAnalytics/streamingjobs/templates/arm/OutputEvents_c0dbcbee-eefd-4ee4-bd25-48d42444c882.json
new file mode 100644
index 000000000..d8a4dfaf0
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/arm/OutputEvents_c0dbcbee-eefd-4ee4-bd25-48d42444c882.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Output Events",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OutputEvents",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/arm/OutputWatermarkDelaySeconds_289283c0-87ae-475f-b756-306783c7ec4d.json b/services/StreamAnalytics/streamingjobs/templates/arm/OutputWatermarkDelaySeconds_289283c0-87ae-475f-b756-306783c7ec4d.json
new file mode 100644
index 000000000..f34e51214
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/arm/OutputWatermarkDelaySeconds_289283c0-87ae-475f-b756-306783c7ec4d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Watermark Delay",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "3600",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "OutputWatermarkDelaySeconds",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/arm/ProcessCPUUsagePercentage_ea14eb56-238e-42b2-95ae-4d624d720d10.json b/services/StreamAnalytics/streamingjobs/templates/arm/ProcessCPUUsagePercentage_ea14eb56-238e-42b2-95ae-4d624d720d10.json
new file mode 100644
index 000000000..b26e39b80
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/arm/ProcessCPUUsagePercentage_ea14eb56-238e-42b2-95ae-4d624d720d10.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU % Utilization",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ProcessCPUUsagePercentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/arm/ResourceUtilization_4f2ead64-7412-4695-9855-47f36ade6f7e.json b/services/StreamAnalytics/streamingjobs/templates/arm/ResourceUtilization_4f2ead64-7412-4695-9855-47f36ade6f7e.json
new file mode 100644
index 000000000..7b4d0b8f7
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/arm/ResourceUtilization_4f2ead64-7412-4695-9855-47f36ade6f7e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "SU (Memory) % Utilization",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "ResourceUtilization",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/bicep/AMLCalloutFailedRequests_f0fa5804-9d5f-4e23-91c0-996c561585ef.bicep b/services/StreamAnalytics/streamingjobs/templates/bicep/AMLCalloutFailedRequests_f0fa5804-9d5f-4e23-91c0-996c561585ef.bicep
new file mode 100644
index 000000000..f759b7b15
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/bicep/AMLCalloutFailedRequests_f0fa5804-9d5f-4e23-91c0-996c561585ef.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Failed Function Requests'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'AMLCalloutFailedRequests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/bicep/ConversionErrors_7d30aeb3-31e5-4742-aa7e-825c2a6af42a.bicep b/services/StreamAnalytics/streamingjobs/templates/bicep/ConversionErrors_7d30aeb3-31e5-4742-aa7e-825c2a6af42a.bicep
new file mode 100644
index 000000000..d5f7e0d63
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/bicep/ConversionErrors_7d30aeb3-31e5-4742-aa7e-825c2a6af42a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Data Conversion Errors'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ConversionErrors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/bicep/DeserializationError_381221db-fd9a-4d65-a16f-63e7492b0a49.bicep b/services/StreamAnalytics/streamingjobs/templates/bicep/DeserializationError_381221db-fd9a-4d65-a16f-63e7492b0a49.bicep
new file mode 100644
index 000000000..167a6a59a
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/bicep/DeserializationError_381221db-fd9a-4d65-a16f-63e7492b0a49.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Input Deserialization Errors'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DeserializationError'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/bicep/Errors_ebd9a9cf-7aa1-4c75-8b76-33f94e4bb8ef.bicep b/services/StreamAnalytics/streamingjobs/templates/bicep/Errors_ebd9a9cf-7aa1-4c75-8b76-33f94e4bb8ef.bicep
new file mode 100644
index 000000000..97323e2cf
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/bicep/Errors_ebd9a9cf-7aa1-4c75-8b76-33f94e4bb8ef.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Runtime Errors'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Errors'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/bicep/InputEventsSourcesBacklogged_b46ef7a9-6597-4c4f-a5ca-9ca653e1b716.bicep b/services/StreamAnalytics/streamingjobs/templates/bicep/InputEventsSourcesBacklogged_b46ef7a9-6597-4c4f-a5ca-9ca653e1b716.bicep
new file mode 100644
index 000000000..2363dd25b
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/bicep/InputEventsSourcesBacklogged_b46ef7a9-6597-4c4f-a5ca-9ca653e1b716.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Backlogged Input Events'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'InputEventsSourcesBacklogged'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/bicep/InputEvents_1dc8c746-4caf-4355-9d82-bdeaa1cf95bf.bicep b/services/StreamAnalytics/streamingjobs/templates/bicep/InputEvents_1dc8c746-4caf-4355-9d82-bdeaa1cf95bf.bicep
new file mode 100644
index 000000000..ad09c0d4b
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/bicep/InputEvents_1dc8c746-4caf-4355-9d82-bdeaa1cf95bf.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Input Events'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'InputEvents'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/bicep/OutputEvents_c0dbcbee-eefd-4ee4-bd25-48d42444c882.bicep b/services/StreamAnalytics/streamingjobs/templates/bicep/OutputEvents_c0dbcbee-eefd-4ee4-bd25-48d42444c882.bicep
new file mode 100644
index 000000000..7ea5a78d9
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/bicep/OutputEvents_c0dbcbee-eefd-4ee4-bd25-48d42444c882.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Output Events'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OutputEvents'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/bicep/OutputWatermarkDelaySeconds_289283c0-87ae-475f-b756-306783c7ec4d.bicep b/services/StreamAnalytics/streamingjobs/templates/bicep/OutputWatermarkDelaySeconds_289283c0-87ae-475f-b756-306783c7ec4d.bicep
new file mode 100644
index 000000000..83e8d56c3
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/bicep/OutputWatermarkDelaySeconds_289283c0-87ae-475f-b756-306783c7ec4d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Watermark Delay'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 3600
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'OutputWatermarkDelaySeconds'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/bicep/ProcessCPUUsagePercentage_ea14eb56-238e-42b2-95ae-4d624d720d10.bicep b/services/StreamAnalytics/streamingjobs/templates/bicep/ProcessCPUUsagePercentage_ea14eb56-238e-42b2-95ae-4d624d720d10.bicep
new file mode 100644
index 000000000..1f5a4a74f
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/bicep/ProcessCPUUsagePercentage_ea14eb56-238e-42b2-95ae-4d624d720d10.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU % Utilization'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ProcessCPUUsagePercentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/StreamAnalytics/streamingjobs/templates/bicep/ResourceUtilization_4f2ead64-7412-4695-9855-47f36ade6f7e.bicep b/services/StreamAnalytics/streamingjobs/templates/bicep/ResourceUtilization_4f2ead64-7412-4695-9855-47f36ade6f7e.bicep
new file mode 100644
index 000000000..ba91d4fdb
--- /dev/null
+++ b/services/StreamAnalytics/streamingjobs/templates/bicep/ResourceUtilization_4f2ead64-7412-4695-9855-47f36ade6f7e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'SU (Memory) % Utilization'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'ResourceUtilization'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Synapse/workspaces/templates/arm/BuiltinSqlPoolDataProcessedBytes_8e2a7c77-890c-49d5-aadd-052764135995.json b/services/Synapse/workspaces/templates/arm/BuiltinSqlPoolDataProcessedBytes_8e2a7c77-890c-49d5-aadd-052764135995.json
new file mode 100644
index 000000000..9bac0d491
--- /dev/null
+++ b/services/Synapse/workspaces/templates/arm/BuiltinSqlPoolDataProcessedBytes_8e2a7c77-890c-49d5-aadd-052764135995.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Amount of data processed by queries",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "386547056640",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BuiltinSqlPoolDataProcessedBytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Synapse/workspaces/templates/arm/BuiltinSqlPoolLoginAttempts_6cf01e09-24d5-4097-bac1-1d39b0f577c8.json b/services/Synapse/workspaces/templates/arm/BuiltinSqlPoolLoginAttempts_6cf01e09-24d5-4097-bac1-1d39b0f577c8.json
new file mode 100644
index 000000000..d9a6c1c4d
--- /dev/null
+++ b/services/Synapse/workspaces/templates/arm/BuiltinSqlPoolLoginAttempts_6cf01e09-24d5-4097-bac1-1d39b0f577c8.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of login attempts that succeded or failed",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "360",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BuiltinSqlPoolLoginAttempts",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Synapse/workspaces/templates/arm/IntegrationActivityRunsEnded_21280a1a-d4e5-4ec3-83f5-f8d22ae0340a.json b/services/Synapse/workspaces/templates/arm/IntegrationActivityRunsEnded_21280a1a-d4e5-4ec3-83f5-f8d22ae0340a.json
new file mode 100644
index 000000000..c1e076950
--- /dev/null
+++ b/services/Synapse/workspaces/templates/arm/IntegrationActivityRunsEnded_21280a1a-d4e5-4ec3-83f5-f8d22ae0340a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of integration activities that succeeded, failed, or were cancelled",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "700",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Count",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IntegrationActivityRunsEnded",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Synapse/workspaces/templates/arm/IntegrationPipelineRunsEnded_16072e08-8ffb-48c9-afa9-fe2192b4513b.json b/services/Synapse/workspaces/templates/arm/IntegrationPipelineRunsEnded_16072e08-8ffb-48c9-afa9-fe2192b4513b.json
new file mode 100644
index 000000000..b4c8f2480
--- /dev/null
+++ b/services/Synapse/workspaces/templates/arm/IntegrationPipelineRunsEnded_16072e08-8ffb-48c9-afa9-fe2192b4513b.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of integration pipeline runs that succeeded, failed, or were cancelled",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IntegrationPipelineRunsEnded",
+ "dimensions": [{"operator": "include", "name": "result", "values": ["failed"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Synapse/workspaces/templates/arm/IntegrationTriggerRunsEnded_583c6484-b7a3-4908-b4d4-9a8b08d1edf9.json b/services/Synapse/workspaces/templates/arm/IntegrationTriggerRunsEnded_583c6484-b7a3-4908-b4d4-9a8b08d1edf9.json
new file mode 100644
index 000000000..5da5d2a8b
--- /dev/null
+++ b/services/Synapse/workspaces/templates/arm/IntegrationTriggerRunsEnded_583c6484-b7a3-4908-b4d4-9a8b08d1edf9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Count of integration triggers that succeeded, failed, or were cancelled",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "IntegrationTriggerRunsEnded",
+ "dimensions": [{"operator": "exclude", "name": "result", "values": ["succeeded"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Synapse/workspaces/templates/arm/sqlPools-CPUPercent_d8d1bc29-bfdb-48a5-89bd-7e34522d8085.json b/services/Synapse/workspaces/templates/arm/sqlPools-CPUPercent_d8d1bc29-bfdb-48a5-89bd-7e34522d8085.json
new file mode 100644
index 000000000..b148f7104
--- /dev/null
+++ b/services/Synapse/workspaces/templates/arm/sqlPools-CPUPercent_d8d1bc29-bfdb-48a5-89bd-7e34522d8085.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "CPU utilization across all nodes in the SQL pool",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CPUPercent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Synapse/workspaces/templates/arm/sqlPools-DWUUsedPercent_64f41eaa-048f-4892-b80f-593e74ef4f84.json b/services/Synapse/workspaces/templates/arm/sqlPools-DWUUsedPercent_64f41eaa-048f-4892-b80f-593e74ef4f84.json
new file mode 100644
index 000000000..443fc72fc
--- /dev/null
+++ b/services/Synapse/workspaces/templates/arm/sqlPools-DWUUsedPercent_64f41eaa-048f-4892-b80f-593e74ef4f84.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Represents a high-level representation of usage across the SQL pool. Measured by taking the maximum between CPU percentage and Data IO percentage",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DWUUsedPercent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Synapse/workspaces/templates/arm/sqlPools-MemoryUsedPercent_4c4d35e8-fdd7-4951-8a71-7b9add69d337.json b/services/Synapse/workspaces/templates/arm/sqlPools-MemoryUsedPercent_4c4d35e8-fdd7-4951-8a71-7b9add69d337.json
new file mode 100644
index 000000000..25147d0cc
--- /dev/null
+++ b/services/Synapse/workspaces/templates/arm/sqlPools-MemoryUsedPercent_4c4d35e8-fdd7-4951-8a71-7b9add69d337.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Memory utilization across all nodes in the SQL pool",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "80",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "MemoryUsedPercent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Synapse/workspaces/templates/bicep/BuiltinSqlPoolDataProcessedBytes_8e2a7c77-890c-49d5-aadd-052764135995.bicep b/services/Synapse/workspaces/templates/bicep/BuiltinSqlPoolDataProcessedBytes_8e2a7c77-890c-49d5-aadd-052764135995.bicep
new file mode 100644
index 000000000..7cbaa0deb
--- /dev/null
+++ b/services/Synapse/workspaces/templates/bicep/BuiltinSqlPoolDataProcessedBytes_8e2a7c77-890c-49d5-aadd-052764135995.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Amount of data processed by queries'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 386547056640
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BuiltinSqlPoolDataProcessedBytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Synapse/workspaces/templates/bicep/BuiltinSqlPoolLoginAttempts_6cf01e09-24d5-4097-bac1-1d39b0f577c8.bicep b/services/Synapse/workspaces/templates/bicep/BuiltinSqlPoolLoginAttempts_6cf01e09-24d5-4097-bac1-1d39b0f577c8.bicep
new file mode 100644
index 000000000..8f0a27c7b
--- /dev/null
+++ b/services/Synapse/workspaces/templates/bicep/BuiltinSqlPoolLoginAttempts_6cf01e09-24d5-4097-bac1-1d39b0f577c8.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of login attempts that succeded or failed'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 360
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BuiltinSqlPoolLoginAttempts'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Synapse/workspaces/templates/bicep/IntegrationActivityRunsEnded_21280a1a-d4e5-4ec3-83f5-f8d22ae0340a.bicep b/services/Synapse/workspaces/templates/bicep/IntegrationActivityRunsEnded_21280a1a-d4e5-4ec3-83f5-f8d22ae0340a.bicep
new file mode 100644
index 000000000..fe9950a3f
--- /dev/null
+++ b/services/Synapse/workspaces/templates/bicep/IntegrationActivityRunsEnded_21280a1a-d4e5-4ec3-83f5-f8d22ae0340a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of integration activities that succeeded, failed, or were cancelled'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 700
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Count'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IntegrationActivityRunsEnded'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Synapse/workspaces/templates/bicep/IntegrationPipelineRunsEnded_16072e08-8ffb-48c9-afa9-fe2192b4513b.bicep b/services/Synapse/workspaces/templates/bicep/IntegrationPipelineRunsEnded_16072e08-8ffb-48c9-afa9-fe2192b4513b.bicep
new file mode 100644
index 000000000..a7658eb49
--- /dev/null
+++ b/services/Synapse/workspaces/templates/bicep/IntegrationPipelineRunsEnded_16072e08-8ffb-48c9-afa9-fe2192b4513b.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of integration pipeline runs that succeeded, failed, or were cancelled'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IntegrationPipelineRunsEnded'
+ dimensions: [
+ {
+ name: 'result'
+ operator: 'include'
+ values: ['failed']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Synapse/workspaces/templates/bicep/IntegrationTriggerRunsEnded_583c6484-b7a3-4908-b4d4-9a8b08d1edf9.bicep b/services/Synapse/workspaces/templates/bicep/IntegrationTriggerRunsEnded_583c6484-b7a3-4908-b4d4-9a8b08d1edf9.bicep
new file mode 100644
index 000000000..afba5cf4f
--- /dev/null
+++ b/services/Synapse/workspaces/templates/bicep/IntegrationTriggerRunsEnded_583c6484-b7a3-4908-b4d4-9a8b08d1edf9.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Count of integration triggers that succeeded, failed, or were cancelled'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'IntegrationTriggerRunsEnded'
+ dimensions: [
+ {
+ name: 'result'
+ operator: 'exclude'
+ values: ['succeeded']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Synapse/workspaces/templates/bicep/sqlPools-CPUPercent_d8d1bc29-bfdb-48a5-89bd-7e34522d8085.bicep b/services/Synapse/workspaces/templates/bicep/sqlPools-CPUPercent_d8d1bc29-bfdb-48a5-89bd-7e34522d8085.bicep
new file mode 100644
index 000000000..4747aa9e0
--- /dev/null
+++ b/services/Synapse/workspaces/templates/bicep/sqlPools-CPUPercent_d8d1bc29-bfdb-48a5-89bd-7e34522d8085.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'CPU utilization across all nodes in the SQL pool'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CPUPercent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Synapse/workspaces/templates/bicep/sqlPools-DWUUsedPercent_64f41eaa-048f-4892-b80f-593e74ef4f84.bicep b/services/Synapse/workspaces/templates/bicep/sqlPools-DWUUsedPercent_64f41eaa-048f-4892-b80f-593e74ef4f84.bicep
new file mode 100644
index 000000000..4e71fe543
--- /dev/null
+++ b/services/Synapse/workspaces/templates/bicep/sqlPools-DWUUsedPercent_64f41eaa-048f-4892-b80f-593e74ef4f84.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Represents a high-level representation of usage across the SQL pool. Measured by taking the maximum between CPU percentage and Data IO percentage'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DWUUsedPercent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Synapse/workspaces/templates/bicep/sqlPools-MemoryUsedPercent_4c4d35e8-fdd7-4951-8a71-7b9add69d337.bicep b/services/Synapse/workspaces/templates/bicep/sqlPools-MemoryUsedPercent_4c4d35e8-fdd7-4951-8a71-7b9add69d337.bicep
new file mode 100644
index 000000000..9a3932974
--- /dev/null
+++ b/services/Synapse/workspaces/templates/bicep/sqlPools-MemoryUsedPercent_4c4d35e8-fdd7-4951-8a71-7b9add69d337.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Memory utilization across all nodes in the SQL pool'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 80
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'MemoryUsedPercent'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/serverFarms/Deploy-WSF-DiskQueueLength-Alert.json b/services/Web/serverFarms/Deploy-WSF-DiskQueueLength-Alert.json
index 1f3d33b38..a08cc6460 100644
--- a/services/Web/serverFarms/Deploy-WSF-DiskQueueLength-Alert.json
+++ b/services/Web/serverFarms/Deploy-WSF-DiskQueueLength-Alert.json
@@ -8,7 +8,7 @@
"displayName": "Deploy App Service Plan Disk Queue Length Alert",
"description": "Policy to audit/deploy App Service Plan Disk Queue Length Alert",
"metadata": {
- "version": "1.2.0",
+ "version": "1.3.0",
"category": "Web Services",
"source": "https://github.com/Azure/azure-monitor-baseline-alerts/",
"alzCloudEnvironments": [
diff --git a/services/Web/serverFarms/templates/arm/BytesReceived_7bdc68c3-7679-482d-82e4-92a8229db9d7.json b/services/Web/serverFarms/templates/arm/BytesReceived_7bdc68c3-7679-482d-82e4-92a8229db9d7.json
new file mode 100644
index 000000000..1d62e89d7
--- /dev/null
+++ b/services/Web/serverFarms/templates/arm/BytesReceived_7bdc68c3-7679-482d-82e4-92a8229db9d7.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average incoming bandwidth used across all instances of the plan.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BytesReceived",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/serverFarms/templates/arm/BytesSent_520cc4d4-2caa-42df-b8b7-86dbc4786ce6.json b/services/Web/serverFarms/templates/arm/BytesSent_520cc4d4-2caa-42df-b8b7-86dbc4786ce6.json
new file mode 100644
index 000000000..b252d3adb
--- /dev/null
+++ b/services/Web/serverFarms/templates/arm/BytesSent_520cc4d4-2caa-42df-b8b7-86dbc4786ce6.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average outgoing bandwidth used across all instances of the plan.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterOrLessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "BytesSent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/serverFarms/templates/arm/CpuPercentage_8748b7d6-ef2a-4548-bf8e-dc6eecd2a651.json b/services/Web/serverFarms/templates/arm/CpuPercentage_8748b7d6-ef2a-4548-bf8e-dc6eecd2a651.json
new file mode 100644
index 000000000..cb536bc2e
--- /dev/null
+++ b/services/Web/serverFarms/templates/arm/CpuPercentage_8748b7d6-ef2a-4548-bf8e-dc6eecd2a651.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average CPU used across all instances of the plan.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CpuPercentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/serverFarms/templates/arm/DiskQueueLength_14dbacac-2559-4537-9be9-7d08bdd0888d.json b/services/Web/serverFarms/templates/arm/DiskQueueLength_14dbacac-2559-4537-9be9-7d08bdd0888d.json
new file mode 100644
index 000000000..e5ccf04fa
--- /dev/null
+++ b/services/Web/serverFarms/templates/arm/DiskQueueLength_14dbacac-2559-4537-9be9-7d08bdd0888d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average number of both read and write requests that were queued on storage. A high disk queue length is an indication of an app that might be slowing down because of excessive disk I/O.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "DiskQueueLength",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/serverFarms/templates/arm/HttpQueueLength_e85efb6a-239a-41e0-8cdd-b1792c41ec41.json b/services/Web/serverFarms/templates/arm/HttpQueueLength_e85efb6a-239a-41e0-8cdd-b1792c41ec41.json
new file mode 100644
index 000000000..d2e6a654b
--- /dev/null
+++ b/services/Web/serverFarms/templates/arm/HttpQueueLength_e85efb6a-239a-41e0-8cdd-b1792c41ec41.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average number of HTTP requests that had to sit on the queue before being fulfilled. A high or increasing HTTP Queue length is a symptom of a plan under heavy load.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "HttpQueueLength",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/serverFarms/templates/arm/MemoryPercentage_b87ecc60-7558-4cb4-8ef9-3185c4c19579.json b/services/Web/serverFarms/templates/arm/MemoryPercentage_b87ecc60-7558-4cb4-8ef9-3185c4c19579.json
new file mode 100644
index 000000000..9fc853a87
--- /dev/null
+++ b/services/Web/serverFarms/templates/arm/MemoryPercentage_b87ecc60-7558-4cb4-8ef9-3185c4c19579.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average memory used across all instances of the plan.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "90",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "MemoryPercentage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/serverFarms/templates/arm/SocketOutboundAll_96257455-b2cf-4f35-9c64-00eea637471a.json b/services/Web/serverFarms/templates/arm/SocketOutboundAll_96257455-b2cf-4f35-9c64-00eea637471a.json
new file mode 100644
index 000000000..27fec72c1
--- /dev/null
+++ b/services/Web/serverFarms/templates/arm/SocketOutboundAll_96257455-b2cf-4f35-9c64-00eea637471a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average number of sockets used for outbound connections across all the instances of the plan irrespective of their TCP states. Having too many outbound connections can cause connectivity errors.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "SocketOutboundAll",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/serverFarms/templates/arm/TcpEstablished_f03350e9-f936-4ac0-a64f-2d2df1fc9f75.json b/services/Web/serverFarms/templates/arm/TcpEstablished_f03350e9-f936-4ac0-a64f-2d2df1fc9f75.json
new file mode 100644
index 000000000..b666c5f41
--- /dev/null
+++ b/services/Web/serverFarms/templates/arm/TcpEstablished_f03350e9-f936-4ac0-a64f-2d2df1fc9f75.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average number of sockets in ESTABLISHED state across all the instances of the plan.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1500",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TcpEstablished",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/serverFarms/templates/arm/TcpTimeWait_2a129b1b-36a7-4048-9403-004dc5e6b0b2.json b/services/Web/serverFarms/templates/arm/TcpTimeWait_2a129b1b-36a7-4048-9403-004dc5e6b0b2.json
new file mode 100644
index 000000000..573da1ace
--- /dev/null
+++ b/services/Web/serverFarms/templates/arm/TcpTimeWait_2a129b1b-36a7-4048-9403-004dc5e6b0b2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average number of sockets in TIME_WAIT state across all the instances of the plan.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "300",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "TcpTimeWait",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/serverFarms/templates/bicep/BytesReceived_7bdc68c3-7679-482d-82e4-92a8229db9d7.bicep b/services/Web/serverFarms/templates/bicep/BytesReceived_7bdc68c3-7679-482d-82e4-92a8229db9d7.bicep
new file mode 100644
index 000000000..b626b07b6
--- /dev/null
+++ b/services/Web/serverFarms/templates/bicep/BytesReceived_7bdc68c3-7679-482d-82e4-92a8229db9d7.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average incoming bandwidth used across all instances of the plan.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BytesReceived'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/serverFarms/templates/bicep/BytesSent_520cc4d4-2caa-42df-b8b7-86dbc4786ce6.bicep b/services/Web/serverFarms/templates/bicep/BytesSent_520cc4d4-2caa-42df-b8b7-86dbc4786ce6.bicep
new file mode 100644
index 000000000..bb3305b42
--- /dev/null
+++ b/services/Web/serverFarms/templates/bicep/BytesSent_520cc4d4-2caa-42df-b8b7-86dbc4786ce6.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average outgoing bandwidth used across all instances of the plan.'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterOrLessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'BytesSent'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/serverFarms/templates/bicep/CpuPercentage_8748b7d6-ef2a-4548-bf8e-dc6eecd2a651.bicep b/services/Web/serverFarms/templates/bicep/CpuPercentage_8748b7d6-ef2a-4548-bf8e-dc6eecd2a651.bicep
new file mode 100644
index 000000000..204beab97
--- /dev/null
+++ b/services/Web/serverFarms/templates/bicep/CpuPercentage_8748b7d6-ef2a-4548-bf8e-dc6eecd2a651.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average CPU used across all instances of the plan.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CpuPercentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/serverFarms/templates/bicep/DiskQueueLength_14dbacac-2559-4537-9be9-7d08bdd0888d.bicep b/services/Web/serverFarms/templates/bicep/DiskQueueLength_14dbacac-2559-4537-9be9-7d08bdd0888d.bicep
new file mode 100644
index 000000000..d3dfebba3
--- /dev/null
+++ b/services/Web/serverFarms/templates/bicep/DiskQueueLength_14dbacac-2559-4537-9be9-7d08bdd0888d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average number of both read and write requests that were queued on storage. A high disk queue length is an indication of an app that might be slowing down because of excessive disk I/O.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'DiskQueueLength'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/serverFarms/templates/bicep/HttpQueueLength_e85efb6a-239a-41e0-8cdd-b1792c41ec41.bicep b/services/Web/serverFarms/templates/bicep/HttpQueueLength_e85efb6a-239a-41e0-8cdd-b1792c41ec41.bicep
new file mode 100644
index 000000000..eb515ce37
--- /dev/null
+++ b/services/Web/serverFarms/templates/bicep/HttpQueueLength_e85efb6a-239a-41e0-8cdd-b1792c41ec41.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average number of HTTP requests that had to sit on the queue before being fulfilled. A high or increasing HTTP Queue length is a symptom of a plan under heavy load.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'HttpQueueLength'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/serverFarms/templates/bicep/MemoryPercentage_b87ecc60-7558-4cb4-8ef9-3185c4c19579.bicep b/services/Web/serverFarms/templates/bicep/MemoryPercentage_b87ecc60-7558-4cb4-8ef9-3185c4c19579.bicep
new file mode 100644
index 000000000..32a47fea4
--- /dev/null
+++ b/services/Web/serverFarms/templates/bicep/MemoryPercentage_b87ecc60-7558-4cb4-8ef9-3185c4c19579.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average memory used across all instances of the plan.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 90
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'MemoryPercentage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/serverFarms/templates/bicep/SocketOutboundAll_96257455-b2cf-4f35-9c64-00eea637471a.bicep b/services/Web/serverFarms/templates/bicep/SocketOutboundAll_96257455-b2cf-4f35-9c64-00eea637471a.bicep
new file mode 100644
index 000000000..76cb65043
--- /dev/null
+++ b/services/Web/serverFarms/templates/bicep/SocketOutboundAll_96257455-b2cf-4f35-9c64-00eea637471a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average number of sockets used for outbound connections across all the instances of the plan irrespective of their TCP states. Having too many outbound connections can cause connectivity errors.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'SocketOutboundAll'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/serverFarms/templates/bicep/TcpEstablished_f03350e9-f936-4ac0-a64f-2d2df1fc9f75.bicep b/services/Web/serverFarms/templates/bicep/TcpEstablished_f03350e9-f936-4ac0-a64f-2d2df1fc9f75.bicep
new file mode 100644
index 000000000..783958540
--- /dev/null
+++ b/services/Web/serverFarms/templates/bicep/TcpEstablished_f03350e9-f936-4ac0-a64f-2d2df1fc9f75.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average number of sockets in ESTABLISHED state across all the instances of the plan.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1500
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TcpEstablished'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/serverFarms/templates/bicep/TcpTimeWait_2a129b1b-36a7-4048-9403-004dc5e6b0b2.bicep b/services/Web/serverFarms/templates/bicep/TcpTimeWait_2a129b1b-36a7-4048-9403-004dc5e6b0b2.bicep
new file mode 100644
index 000000000..858fe61a7
--- /dev/null
+++ b/services/Web/serverFarms/templates/bicep/TcpTimeWait_2a129b1b-36a7-4048-9403-004dc5e6b0b2.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average number of sockets in TIME_WAIT state across all the instances of the plan.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 300
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'TcpTimeWait'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/arm/AppConnections_a74bd8f3-cab7-46e6-ac1e-7527d2385bee.json b/services/Web/sites/templates/arm/AppConnections_a74bd8f3-cab7-46e6-ac1e-7527d2385bee.json
new file mode 100644
index 000000000..ff29e0637
--- /dev/null
+++ b/services/Web/sites/templates/arm/AppConnections_a74bd8f3-cab7-46e6-ac1e-7527d2385bee.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of bound sockets existing in the sandbox (w3wp.exe and its child processes). A bound socket is created by calling bind()/connect() APIs and remains until said socket is closed with CloseHandle()/closesocket(). For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "6000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "AppConnections",
+ "dimensions": [{"operator": "include", "name": "instance", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/AverageResponseTime_b16f8234-e6c6-4723-933e-e5f8c179f23d.json b/services/Web/sites/templates/arm/AverageResponseTime_b16f8234-e6c6-4723-933e-e5f8c179f23d.json
new file mode 100644
index 000000000..ecc7d47ca
--- /dev/null
+++ b/services/Web/sites/templates/arm/AverageResponseTime_b16f8234-e6c6-4723-933e-e5f8c179f23d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average time taken for the app to serve requests, in seconds. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "60",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "AverageResponseTime",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/BytesReceived_a9177e32-e3fa-425a-a02e-727ff3515ae0.json b/services/Web/sites/templates/arm/BytesReceived_a9177e32-e3fa-425a-a02e-727ff3515ae0.json
new file mode 100644
index 000000000..1eaa02ec2
--- /dev/null
+++ b/services/Web/sites/templates/arm/BytesReceived_a9177e32-e3fa-425a-a02e-727ff3515ae0.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of incoming bandwidth consumed by the app, in MiB. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "2048000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "BytesReceived",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/BytesSent_49f62a85-7edf-4afc-9201-7a8939d6a42a.json b/services/Web/sites/templates/arm/BytesSent_49f62a85-7edf-4afc-9201-7a8939d6a42a.json
new file mode 100644
index 000000000..43c3c342e
--- /dev/null
+++ b/services/Web/sites/templates/arm/BytesSent_49f62a85-7edf-4afc-9201-7a8939d6a42a.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of outgoing bandwidth consumed by the app, in MiB. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterOrLessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "BytesSent",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/CpuTime_48fcc15e-f043-4bb5-a628-6aefc60432c1.json b/services/Web/sites/templates/arm/CpuTime_48fcc15e-f043-4bb5-a628-6aefc60432c1.json
new file mode 100644
index 000000000..99e8993e7
--- /dev/null
+++ b/services/Web/sites/templates/arm/CpuTime_48fcc15e-f043-4bb5-a628-6aefc60432c1.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The amount of CPU consumed by the app, in seconds. For more information about this metric. Please see https://aka.ms/website-monitor-cpu-time-vs-cpu-percentage (CPU time vs CPU percentage). For WebApps only.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "120",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CpuTime",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/CurrentAssemblies_b63593ad-6c47-49e3-9b4a-e8b19f0cc7db.json b/services/Web/sites/templates/arm/CurrentAssemblies_b63593ad-6c47-49e3-9b4a-e8b19f0cc7db.json
new file mode 100644
index 000000000..68e1653c3
--- /dev/null
+++ b/services/Web/sites/templates/arm/CurrentAssemblies_b63593ad-6c47-49e3-9b4a-e8b19f0cc7db.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The current number of Assemblies loaded across all AppDomains in this application. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "CurrentAssemblies",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/FileSystemUsage_b0c0fca3-1832-4a18-8832-5eebd2c1370a.json b/services/Web/sites/templates/arm/FileSystemUsage_b0c0fca3-1832-4a18-8832-5eebd2c1370a.json
new file mode 100644
index 000000000..22c8cec3f
--- /dev/null
+++ b/services/Web/sites/templates/arm/FileSystemUsage_b0c0fca3-1832-4a18-8832-5eebd2c1370a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Percentage of filesystem quota consumed by the app. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "400000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT6H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1H",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FileSystemUsage",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/FunctionExecutionCount_1e71d59c-b29f-4b43-9f49-7aa0da50c88c.json b/services/Web/sites/templates/arm/FunctionExecutionCount_1e71d59c-b29f-4b43-9f49-7aa0da50c88c.json
new file mode 100644
index 000000000..228e050aa
--- /dev/null
+++ b/services/Web/sites/templates/arm/FunctionExecutionCount_1e71d59c-b29f-4b43-9f49-7aa0da50c88c.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Function Execution Count. For FunctionApps only.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThanOrEqual",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FunctionExecutionCount",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/FunctionExecutionUnits_12241b03-3f62-4100-9cf3-7798a7796600.json b/services/Web/sites/templates/arm/FunctionExecutionUnits_12241b03-3f62-4100-9cf3-7798a7796600.json
new file mode 100644
index 000000000..2fb94c395
--- /dev/null
+++ b/services/Web/sites/templates/arm/FunctionExecutionUnits_12241b03-3f62-4100-9cf3-7798a7796600.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Function Execution Units. For FunctionApps only.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "13000000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "FunctionExecutionUnits",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/Handles_dc560ab2-18ad-49ae-9937-9b9a770faaab.json b/services/Web/sites/templates/arm/Handles_dc560ab2-18ad-49ae-9937-9b9a770faaab.json
new file mode 100644
index 000000000..7a67f4d2e
--- /dev/null
+++ b/services/Web/sites/templates/arm/Handles_dc560ab2-18ad-49ae-9937-9b9a770faaab.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The total number of handles currently open by the app process. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterOrLessThan",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": 4,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "Handles",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/Http2xx_e4fa68d2-55cd-4371-9574-95ae5c34d4ae.json b/services/Web/sites/templates/arm/Http2xx_e4fa68d2-55cd-4371-9574-95ae5c34d4ae.json
new file mode 100644
index 000000000..2dda4a477
--- /dev/null
+++ b/services/Web/sites/templates/arm/Http2xx_e4fa68d2-55cd-4371-9574-95ae5c34d4ae.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The count of requests resulting in an HTTP status code >= 200 but < 300. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "15",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Http2xx",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/Http3xx_0853a13e-b316-4ea0-98a2-9d722a508d1e.json b/services/Web/sites/templates/arm/Http3xx_0853a13e-b316-4ea0-98a2-9d722a508d1e.json
new file mode 100644
index 000000000..fbfddc013
--- /dev/null
+++ b/services/Web/sites/templates/arm/Http3xx_0853a13e-b316-4ea0-98a2-9d722a508d1e.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The count of requests resulting in an HTTP status code >= 300 but < 400. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "15",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Http3xx",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/Http401_a8024ffc-b3b7-48eb-8f24-ae7da834cde2.json b/services/Web/sites/templates/arm/Http401_a8024ffc-b3b7-48eb-8f24-ae7da834cde2.json
new file mode 100644
index 000000000..66e9dda39
--- /dev/null
+++ b/services/Web/sites/templates/arm/Http401_a8024ffc-b3b7-48eb-8f24-ae7da834cde2.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The count of requests resulting in HTTP 401 status code. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "20",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Http401",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/Http406_02ef5600-fed6-474a-8fbb-5ed088b04d0d.json b/services/Web/sites/templates/arm/Http406_02ef5600-fed6-474a-8fbb-5ed088b04d0d.json
new file mode 100644
index 000000000..5050c15f2
--- /dev/null
+++ b/services/Web/sites/templates/arm/Http406_02ef5600-fed6-474a-8fbb-5ed088b04d0d.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The count of requests resulting in HTTP 406 status code. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Http406",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/MemoryWorkingSet_93768520-ab75-4e4e-b39b-a210a32379c0.json b/services/Web/sites/templates/arm/MemoryWorkingSet_93768520-ab75-4e4e-b39b-a210a32379c0.json
new file mode 100644
index 000000000..e25a9c6cf
--- /dev/null
+++ b/services/Web/sites/templates/arm/MemoryWorkingSet_93768520-ab75-4e4e-b39b-a210a32379c0.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The current amount of memory used by the app, in MiB. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1500000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "MemoryWorkingSet",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/PrivateBytes_3acdc4ab-514c-42c3-82e1-cb41fa338c2f.json b/services/Web/sites/templates/arm/PrivateBytes_3acdc4ab-514c-42c3-82e1-cb41fa338c2f.json
new file mode 100644
index 000000000..843c3be31
--- /dev/null
+++ b/services/Web/sites/templates/arm/PrivateBytes_3acdc4ab-514c-42c3-82e1-cb41fa338c2f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Private Bytes is the current size, in bytes, of memory that the app process has allocated that can't be shared with other processes. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1200000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "PrivateBytes",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/RequestsInApplicationQueue_2e62242b-6d20-44b5-86f9-f9a0de8ffe3f.json b/services/Web/sites/templates/arm/RequestsInApplicationQueue_2e62242b-6d20-44b5-86f9-f9a0de8ffe3f.json
new file mode 100644
index 000000000..2b8fa47c0
--- /dev/null
+++ b/services/Web/sites/templates/arm/RequestsInApplicationQueue_2e62242b-6d20-44b5-86f9-f9a0de8ffe3f.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of requests in the application request queue. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Maximum",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "RequestsInApplicationQueue",
+ "dimensions": [{"operator": "include", "name": "instance", "values": ["*"]}],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/Requests_fa87c863-2d21-4b9d-897f-452fd35b06c3.json b/services/Web/sites/templates/arm/Requests_fa87c863-2d21-4b9d-897f-452fd35b06c3.json
new file mode 100644
index 000000000..e4cece540
--- /dev/null
+++ b/services/Web/sites/templates/arm/Requests_fa87c863-2d21-4b9d-897f-452fd35b06c3.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The total number of requests regardless of their resulting HTTP status code. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "1000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Requests",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/Threads_9e412261-433b-45fd-8944-2f891bf14a56.json b/services/Web/sites/templates/arm/Threads_9e412261-433b-45fd-8944-2f891bf14a56.json
new file mode 100644
index 000000000..3c0b5a107
--- /dev/null
+++ b/services/Web/sites/templates/arm/Threads_9e412261-433b-45fd-8944-2f891bf14a56.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The number of threads currently active in the app process. For WebApps and FunctionApps.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 4,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "200",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Threads",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/WorkflowRunsFailureRate_89ec4b6f-d1b2-4402-8a1d-48440624fc31.json b/services/Web/sites/templates/arm/WorkflowRunsFailureRate_89ec4b6f-d1b2-4402-8a1d-48440624fc31.json
new file mode 100644
index 000000000..9dff3d3ba
--- /dev/null
+++ b/services/Web/sites/templates/arm/WorkflowRunsFailureRate_89ec4b6f-d1b2-4402-8a1d-48440624fc31.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Workflow Runs Failure Rate. For LogicApps only.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "0",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "WorkflowRunsFailureRate",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/WorkflowTriggersFailureRate_8a492278-c49f-4e4c-8fd5-a1680590864a.json b/services/Web/sites/templates/arm/WorkflowTriggersFailureRate_8a492278-c49f-4e4c-8fd5-a1680590864a.json
new file mode 100644
index 000000000..42f97a779
--- /dev/null
+++ b/services/Web/sites/templates/arm/WorkflowTriggersFailureRate_8a492278-c49f-4e4c-8fd5-a1680590864a.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Workflow Triggers Failure Rate. For LogicApps only.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "50",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "WorkflowTriggersFailureRate",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/slots-AverageMemoryWorkingSet_e6f23a76-11f3-471e-b7d7-ebc787487069.json b/services/Web/sites/templates/arm/slots-AverageMemoryWorkingSet_e6f23a76-11f3-471e-b7d7-ebc787487069.json
new file mode 100644
index 000000000..58bc8d52d
--- /dev/null
+++ b/services/Web/sites/templates/arm/slots-AverageMemoryWorkingSet_e6f23a76-11f3-471e-b7d7-ebc787487069.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The average amount of memory used by the app, in megabytes (MiB).",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "800000000",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "AverageMemoryWorkingSet",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/slots-HealthCheckStatus_ff5238a3-e40f-47c7-a142-f7a19b7764f9.json b/services/Web/sites/templates/arm/slots-HealthCheckStatus_ff5238a3-e40f-47c7-a142-f7a19b7764f9.json
new file mode 100644
index 000000000..a79d16099
--- /dev/null
+++ b/services/Web/sites/templates/arm/slots-HealthCheckStatus_ff5238a3-e40f-47c7-a142-f7a19b7764f9.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "Health check status",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 3,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "LessThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "100",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT1M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "HealthCheckStatus",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/slots-Http403_67ca6d43-ab88-4fb8-9c18-2862765681e6.json b/services/Web/sites/templates/arm/slots-Http403_67ca6d43-ab88-4fb8-9c18-2862765681e6.json
new file mode 100644
index 000000000..5e5559284
--- /dev/null
+++ b/services/Web/sites/templates/arm/slots-Http403_67ca6d43-ab88-4fb8-9c18-2862765681e6.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The count of requests resulting in HTTP 403 status code.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 0,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Http403",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/slots-Http404_265b54e0-33a0-44b3-9f7b-ce53328439e3.json b/services/Web/sites/templates/arm/slots-Http404_265b54e0-33a0-44b3-9f7b-ce53328439e3.json
new file mode 100644
index 000000000..da4e6dd85
--- /dev/null
+++ b/services/Web/sites/templates/arm/slots-Http404_265b54e0-33a0-44b3-9f7b-ce53328439e3.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The count of requests resulting in HTTP 404 status code.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 2,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "30",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Http404",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/slots-Http4xx_0bdd95e0-1d48-40e5-85c7-cd8008b966b0.json b/services/Web/sites/templates/arm/slots-Http4xx_0bdd95e0-1d48-40e5-85c7-cd8008b966b0.json
new file mode 100644
index 000000000..ca471efe2
--- /dev/null
+++ b/services/Web/sites/templates/arm/slots-Http4xx_0bdd95e0-1d48-40e5-85c7-cd8008b966b0.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The count of requests resulting in an HTTP status code >= 400 but < 500.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Http4xx",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/slots-Http5xx_fe7cfeb1-c18f-4822-8e6c-fb73dcd175a8.json b/services/Web/sites/templates/arm/slots-Http5xx_fe7cfeb1-c18f-4822-8e6c-fb73dcd175a8.json
new file mode 100644
index 000000000..1a79e392f
--- /dev/null
+++ b/services/Web/sites/templates/arm/slots-Http5xx_fe7cfeb1-c18f-4822-8e6c-fb73dcd175a8.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The count of requests resulting in an HTTP status code >= 500 but < 600.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "10",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Total",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT5M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "Http5xx",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/arm/slots-HttpResponseTime_b4e2bc80-9307-44d8-89f1-04c7133f37fc.json b/services/Web/sites/templates/arm/slots-HttpResponseTime_b4e2bc80-9307-44d8-89f1-04c7133f37fc.json
new file mode 100644
index 000000000..e992e2e48
--- /dev/null
+++ b/services/Web/sites/templates/arm/slots-HttpResponseTime_b4e2bc80-9307-44d8-89f1-04c7133f37fc.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "The time taken for the app to serve requests, in seconds.",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": 1,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "GreaterThan",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "5",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "Average",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "PT30M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "PT15M",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "HttpResponseTime",
+ "dimensions": [],
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/services/Web/sites/templates/bicep/AppConnections_a74bd8f3-cab7-46e6-ac1e-7527d2385bee.bicep b/services/Web/sites/templates/bicep/AppConnections_a74bd8f3-cab7-46e6-ac1e-7527d2385bee.bicep
new file mode 100644
index 000000000..47e64b291
--- /dev/null
+++ b/services/Web/sites/templates/bicep/AppConnections_a74bd8f3-cab7-46e6-ac1e-7527d2385bee.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of bound sockets existing in the sandbox (w3wp.exe and its child processes). A bound socket is created by calling bind()/connect() APIs and remains until said socket is closed with CloseHandle()/closesocket(). For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 6000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'AppConnections'
+ dimensions: [
+ {
+ name: 'instance'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/AverageResponseTime_b16f8234-e6c6-4723-933e-e5f8c179f23d.bicep b/services/Web/sites/templates/bicep/AverageResponseTime_b16f8234-e6c6-4723-933e-e5f8c179f23d.bicep
new file mode 100644
index 000000000..e1d3d85f8
--- /dev/null
+++ b/services/Web/sites/templates/bicep/AverageResponseTime_b16f8234-e6c6-4723-933e-e5f8c179f23d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average time taken for the app to serve requests, in seconds. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 60
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'AverageResponseTime'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/BytesReceived_a9177e32-e3fa-425a-a02e-727ff3515ae0.bicep b/services/Web/sites/templates/bicep/BytesReceived_a9177e32-e3fa-425a-a02e-727ff3515ae0.bicep
new file mode 100644
index 000000000..7e73b47f8
--- /dev/null
+++ b/services/Web/sites/templates/bicep/BytesReceived_a9177e32-e3fa-425a-a02e-727ff3515ae0.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of incoming bandwidth consumed by the app, in MiB. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 2048000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'BytesReceived'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/BytesSent_49f62a85-7edf-4afc-9201-7a8939d6a42a.bicep b/services/Web/sites/templates/bicep/BytesSent_49f62a85-7edf-4afc-9201-7a8939d6a42a.bicep
new file mode 100644
index 000000000..6ed409b1c
--- /dev/null
+++ b/services/Web/sites/templates/bicep/BytesSent_49f62a85-7edf-4afc-9201-7a8939d6a42a.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of outgoing bandwidth consumed by the app, in MiB. For WebApps and FunctionApps.'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterOrLessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'BytesSent'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/CpuTime_48fcc15e-f043-4bb5-a628-6aefc60432c1.bicep b/services/Web/sites/templates/bicep/CpuTime_48fcc15e-f043-4bb5-a628-6aefc60432c1.bicep
new file mode 100644
index 000000000..a5e362b97
--- /dev/null
+++ b/services/Web/sites/templates/bicep/CpuTime_48fcc15e-f043-4bb5-a628-6aefc60432c1.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The amount of CPU consumed by the app, in seconds. For more information about this metric. Please see https://aka.ms/website-monitor-cpu-time-vs-cpu-percentage (CPU time vs CPU percentage). For WebApps only.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 120
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CpuTime'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/CurrentAssemblies_b63593ad-6c47-49e3-9b4a-e8b19f0cc7db.bicep b/services/Web/sites/templates/bicep/CurrentAssemblies_b63593ad-6c47-49e3-9b4a-e8b19f0cc7db.bicep
new file mode 100644
index 000000000..669559c31
--- /dev/null
+++ b/services/Web/sites/templates/bicep/CurrentAssemblies_b63593ad-6c47-49e3-9b4a-e8b19f0cc7db.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The current number of Assemblies loaded across all AppDomains in this application. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT1M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'CurrentAssemblies'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/FileSystemUsage_b0c0fca3-1832-4a18-8832-5eebd2c1370a.bicep b/services/Web/sites/templates/bicep/FileSystemUsage_b0c0fca3-1832-4a18-8832-5eebd2c1370a.bicep
new file mode 100644
index 000000000..a6d8d60fb
--- /dev/null
+++ b/services/Web/sites/templates/bicep/FileSystemUsage_b0c0fca3-1832-4a18-8832-5eebd2c1370a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Percentage of filesystem quota consumed by the app. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 400000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT6H'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1H'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FileSystemUsage'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/FunctionExecutionCount_1e71d59c-b29f-4b43-9f49-7aa0da50c88c.bicep b/services/Web/sites/templates/bicep/FunctionExecutionCount_1e71d59c-b29f-4b43-9f49-7aa0da50c88c.bicep
new file mode 100644
index 000000000..75651a9ca
--- /dev/null
+++ b/services/Web/sites/templates/bicep/FunctionExecutionCount_1e71d59c-b29f-4b43-9f49-7aa0da50c88c.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Function Execution Count. For FunctionApps only.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThanOrEqual'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FunctionExecutionCount'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/FunctionExecutionUnits_12241b03-3f62-4100-9cf3-7798a7796600.bicep b/services/Web/sites/templates/bicep/FunctionExecutionUnits_12241b03-3f62-4100-9cf3-7798a7796600.bicep
new file mode 100644
index 000000000..094cc7a2d
--- /dev/null
+++ b/services/Web/sites/templates/bicep/FunctionExecutionUnits_12241b03-3f62-4100-9cf3-7798a7796600.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Function Execution Units. For FunctionApps only.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 13000000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'FunctionExecutionUnits'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/Handles_dc560ab2-18ad-49ae-9937-9b9a770faaab.bicep b/services/Web/sites/templates/bicep/Handles_dc560ab2-18ad-49ae-9937-9b9a770faaab.bicep
new file mode 100644
index 000000000..c7ff99437
--- /dev/null
+++ b/services/Web/sites/templates/bicep/Handles_dc560ab2-18ad-49ae-9937-9b9a770faaab.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The total number of handles currently open by the app process. For WebApps and FunctionApps.'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = 'GreaterOrLessThan'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = 4
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = 4
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: 'Handles'
+ dimensions: [[]]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/Http2xx_e4fa68d2-55cd-4371-9574-95ae5c34d4ae.bicep b/services/Web/sites/templates/bicep/Http2xx_e4fa68d2-55cd-4371-9574-95ae5c34d4ae.bicep
new file mode 100644
index 000000000..700f5394d
--- /dev/null
+++ b/services/Web/sites/templates/bicep/Http2xx_e4fa68d2-55cd-4371-9574-95ae5c34d4ae.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The count of requests resulting in an HTTP status code >= 200 but < 300. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 15
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Http2xx'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/Http3xx_0853a13e-b316-4ea0-98a2-9d722a508d1e.bicep b/services/Web/sites/templates/bicep/Http3xx_0853a13e-b316-4ea0-98a2-9d722a508d1e.bicep
new file mode 100644
index 000000000..da7cf98b0
--- /dev/null
+++ b/services/Web/sites/templates/bicep/Http3xx_0853a13e-b316-4ea0-98a2-9d722a508d1e.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The count of requests resulting in an HTTP status code >= 300 but < 400. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 15
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Http3xx'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/Http401_a8024ffc-b3b7-48eb-8f24-ae7da834cde2.bicep b/services/Web/sites/templates/bicep/Http401_a8024ffc-b3b7-48eb-8f24-ae7da834cde2.bicep
new file mode 100644
index 000000000..f7383ffe6
--- /dev/null
+++ b/services/Web/sites/templates/bicep/Http401_a8024ffc-b3b7-48eb-8f24-ae7da834cde2.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The count of requests resulting in HTTP 401 status code. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 20
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Http401'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/Http406_02ef5600-fed6-474a-8fbb-5ed088b04d0d.bicep b/services/Web/sites/templates/bicep/Http406_02ef5600-fed6-474a-8fbb-5ed088b04d0d.bicep
new file mode 100644
index 000000000..b38be07f8
--- /dev/null
+++ b/services/Web/sites/templates/bicep/Http406_02ef5600-fed6-474a-8fbb-5ed088b04d0d.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The count of requests resulting in HTTP 406 status code. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Http406'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/MemoryWorkingSet_93768520-ab75-4e4e-b39b-a210a32379c0.bicep b/services/Web/sites/templates/bicep/MemoryWorkingSet_93768520-ab75-4e4e-b39b-a210a32379c0.bicep
new file mode 100644
index 000000000..f5c601b36
--- /dev/null
+++ b/services/Web/sites/templates/bicep/MemoryWorkingSet_93768520-ab75-4e4e-b39b-a210a32379c0.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The current amount of memory used by the app, in MiB. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1500000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'MemoryWorkingSet'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/PrivateBytes_3acdc4ab-514c-42c3-82e1-cb41fa338c2f.bicep b/services/Web/sites/templates/bicep/PrivateBytes_3acdc4ab-514c-42c3-82e1-cb41fa338c2f.bicep
new file mode 100644
index 000000000..83922109b
--- /dev/null
+++ b/services/Web/sites/templates/bicep/PrivateBytes_3acdc4ab-514c-42c3-82e1-cb41fa338c2f.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Private Bytes is the current size, in bytes, of memory that the app process has allocated that can't be shared with other processes. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1200000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'PrivateBytes'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/RequestsInApplicationQueue_2e62242b-6d20-44b5-86f9-f9a0de8ffe3f.bicep b/services/Web/sites/templates/bicep/RequestsInApplicationQueue_2e62242b-6d20-44b5-86f9-f9a0de8ffe3f.bicep
new file mode 100644
index 000000000..b06bf176e
--- /dev/null
+++ b/services/Web/sites/templates/bicep/RequestsInApplicationQueue_2e62242b-6d20-44b5-86f9-f9a0de8ffe3f.bicep
@@ -0,0 +1,140 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of requests in the application request queue. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Maximum'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'RequestsInApplicationQueue'
+ dimensions: [
+ {
+ name: 'instance'
+ operator: 'include'
+ values: ['*']
+ }]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/Requests_fa87c863-2d21-4b9d-897f-452fd35b06c3.bicep b/services/Web/sites/templates/bicep/Requests_fa87c863-2d21-4b9d-897f-452fd35b06c3.bicep
new file mode 100644
index 000000000..7c304969a
--- /dev/null
+++ b/services/Web/sites/templates/bicep/Requests_fa87c863-2d21-4b9d-897f-452fd35b06c3.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The total number of requests regardless of their resulting HTTP status code. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 1000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Requests'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/Threads_9e412261-433b-45fd-8944-2f891bf14a56.bicep b/services/Web/sites/templates/bicep/Threads_9e412261-433b-45fd-8944-2f891bf14a56.bicep
new file mode 100644
index 000000000..73bad6943
--- /dev/null
+++ b/services/Web/sites/templates/bicep/Threads_9e412261-433b-45fd-8944-2f891bf14a56.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The number of threads currently active in the app process. For WebApps and FunctionApps.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 4
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 200
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Threads'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/WorkflowRunsFailureRate_89ec4b6f-d1b2-4402-8a1d-48440624fc31.bicep b/services/Web/sites/templates/bicep/WorkflowRunsFailureRate_89ec4b6f-d1b2-4402-8a1d-48440624fc31.bicep
new file mode 100644
index 000000000..11adeb1b2
--- /dev/null
+++ b/services/Web/sites/templates/bicep/WorkflowRunsFailureRate_89ec4b6f-d1b2-4402-8a1d-48440624fc31.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Workflow Runs Failure Rate. For LogicApps only.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 0
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'WorkflowRunsFailureRate'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/WorkflowTriggersFailureRate_8a492278-c49f-4e4c-8fd5-a1680590864a.bicep b/services/Web/sites/templates/bicep/WorkflowTriggersFailureRate_8a492278-c49f-4e4c-8fd5-a1680590864a.bicep
new file mode 100644
index 000000000..d45433d47
--- /dev/null
+++ b/services/Web/sites/templates/bicep/WorkflowTriggersFailureRate_8a492278-c49f-4e4c-8fd5-a1680590864a.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Workflow Triggers Failure Rate. For LogicApps only.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 50
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'WorkflowTriggersFailureRate'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/slots-AverageMemoryWorkingSet_e6f23a76-11f3-471e-b7d7-ebc787487069.bicep b/services/Web/sites/templates/bicep/slots-AverageMemoryWorkingSet_e6f23a76-11f3-471e-b7d7-ebc787487069.bicep
new file mode 100644
index 000000000..6f22ac78a
--- /dev/null
+++ b/services/Web/sites/templates/bicep/slots-AverageMemoryWorkingSet_e6f23a76-11f3-471e-b7d7-ebc787487069.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The average amount of memory used by the app, in megabytes (MiB).'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 800000000
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'AverageMemoryWorkingSet'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/slots-HealthCheckStatus_ff5238a3-e40f-47c7-a142-f7a19b7764f9.bicep b/services/Web/sites/templates/bicep/slots-HealthCheckStatus_ff5238a3-e40f-47c7-a142-f7a19b7764f9.bicep
new file mode 100644
index 000000000..c1d58d85a
--- /dev/null
+++ b/services/Web/sites/templates/bicep/slots-HealthCheckStatus_ff5238a3-e40f-47c7-a142-f7a19b7764f9.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'Health check status'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 3
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'LessThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 100
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT5M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT1M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'HealthCheckStatus'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/slots-Http403_67ca6d43-ab88-4fb8-9c18-2862765681e6.bicep b/services/Web/sites/templates/bicep/slots-Http403_67ca6d43-ab88-4fb8-9c18-2862765681e6.bicep
new file mode 100644
index 000000000..1e98c734f
--- /dev/null
+++ b/services/Web/sites/templates/bicep/slots-Http403_67ca6d43-ab88-4fb8-9c18-2862765681e6.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The count of requests resulting in HTTP 403 status code.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 0
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Http403'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/slots-Http404_265b54e0-33a0-44b3-9f7b-ce53328439e3.bicep b/services/Web/sites/templates/bicep/slots-Http404_265b54e0-33a0-44b3-9f7b-ce53328439e3.bicep
new file mode 100644
index 000000000..4cf4a43ef
--- /dev/null
+++ b/services/Web/sites/templates/bicep/slots-Http404_265b54e0-33a0-44b3-9f7b-ce53328439e3.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The count of requests resulting in HTTP 404 status code.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 2
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 30
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Http404'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/slots-Http4xx_0bdd95e0-1d48-40e5-85c7-cd8008b966b0.bicep b/services/Web/sites/templates/bicep/slots-Http4xx_0bdd95e0-1d48-40e5-85c7-cd8008b966b0.bicep
new file mode 100644
index 000000000..8c45d03de
--- /dev/null
+++ b/services/Web/sites/templates/bicep/slots-Http4xx_0bdd95e0-1d48-40e5-85c7-cd8008b966b0.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The count of requests resulting in an HTTP status code >= 400 but < 500.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Http4xx'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/slots-Http5xx_fe7cfeb1-c18f-4822-8e6c-fb73dcd175a8.bicep b/services/Web/sites/templates/bicep/slots-Http5xx_fe7cfeb1-c18f-4822-8e6c-fb73dcd175a8.bicep
new file mode 100644
index 000000000..debc7cd0f
--- /dev/null
+++ b/services/Web/sites/templates/bicep/slots-Http5xx_fe7cfeb1-c18f-4822-8e6c-fb73dcd175a8.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The count of requests resulting in an HTTP status code >= 500 but < 600.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 10
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Total'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT15M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT5M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'Http5xx'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/services/Web/sites/templates/bicep/slots-HttpResponseTime_b4e2bc80-9307-44d8-89f1-04c7133f37fc.bicep b/services/Web/sites/templates/bicep/slots-HttpResponseTime_b4e2bc80-9307-44d8-89f1-04c7133f37fc.bicep
new file mode 100644
index 000000000..d0bf37b30
--- /dev/null
+++ b/services/Web/sites/templates/bicep/slots-HttpResponseTime_b4e2bc80-9307-44d8-89f1-04c7133f37fc.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = 'The time taken for the app to serve requests, in seconds.'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = 1
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = 'GreaterThan'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = 5
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = 'Average'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = 'PT30M'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = 'PT15M'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: 'HttpResponseTime'
+ dimensions: [[]]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = 'pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/tooling/generate-templates/generate-templates.py b/tooling/generate-templates/generate-templates.py
index d6c64b66c..3f2572d50 100644
--- a/tooling/generate-templates/generate-templates.py
+++ b/tooling/generate-templates/generate-templates.py
@@ -2,13 +2,13 @@
import yaml
import json
import argparse
-import datetime
# Parse command line arguments
def parseArguments():
parser = argparse.ArgumentParser(description='This script will generate ARM and Bicep templates for each alert.')
parser.add_argument('-p', '--path', type=str, required=False, metavar='path', help='Path to services directory', default='../../services')
- parser.add_argument('-o', '--output', type=str, required=False, metavar='output', help='Path to output directory', default='../../artifacts/templates')
+ parser.add_argument('-o', '--output', type=str, required=False, metavar='output', help='Path to output directory', default='../../services')
+ parser.add_argument('-s', '--template_path', type=str, required=False, metavar='template_path', help='Path to templates directory', default='templates')
parser.add_argument('-t', '--telemetry_pid', type=str, required=False, metavar='telemetry_pid', help='Telemetry PID', default='pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d')
args = parser.parse_args()
@@ -18,8 +18,7 @@ def readYamlData(dir, export_hidden):
# Walk the directory tree and load all the alerts.yaml files
# into a list of dictionaries using the folder path as the structure
- # for the dictionary. This will allow us to easily export the data
- # to a CSV or XLS file.
+ # for the dictionary.
data = {}
for root, dirs, files in os.walk(dir):
for file in files:
@@ -45,12 +44,12 @@ def readYamlData(dir, export_hidden):
return data
-def readTemplates():
+def readTemplates(template_path):
arm = {}
bicep = {}
# Read ARM templates from arm directory into a string
- for root, dirs, files in os.walk(os.path.join('.', 'arm')):
+ for root, dirs, files in os.walk(os.path.join(template_path, 'arm')):
for file in files:
if file.endswith('.json'):
# read the file into a string
@@ -58,7 +57,7 @@ def readTemplates():
arm[file.replace('.json','')] = f.read()
# Read Bicep templates from arm directory into a string
- for root, dirs, files in os.walk(os.path.join('.', 'bicep')):
+ for root, dirs, files in os.walk(os.path.join(template_path, 'bicep')):
for file in files:
if file.endswith('.bicep'):
# read the file into a string
@@ -73,30 +72,35 @@ def main():
data = readYamlData(args.path, False)
- arm, bicep = readTemplates()
+ arm, bicep = readTemplates(args.template_path)
import datetime
+ import re
- # Get the current timestamp
- timestamp = datetime.datetime.now()
+ for category in data:
+ for resourceType in data[category]:
- # Format it as a string
- formatted_timestamp = timestamp.strftime("%Y%m%d%H%M%S")
+ print(f"Generating templates for {len(data[category][resourceType])} alerts in {category}/{resourceType}...")
- # Create the output directory if it doesn't exist
- os.makedirs(args.output, exist_ok=True)
+ # create directories based on template types if it doesn't exist
+ os.makedirs(os.path.join(args.output, category, resourceType, "templates", "arm"), exist_ok=True)
+ os.makedirs(os.path.join(args.output, category, resourceType, "templates", "bicep"), exist_ok=True)
- # Write timestamp to a file
- with open(os.path.join(args.output, 'latest_version.txt'), 'w') as f:
- f.write(formatted_timestamp)
+ # Remove all files in arm and bicep directories
+ for root, dirs, files in os.walk(os.path.join(args.output, category, resourceType, "templates", "arm")):
+ for file in files:
+ os.remove(os.path.join(root, file))
- for category in data:
- for resourceType in data[category]:
- # create directory based on resourceType if it doesn't exist
- os.makedirs(os.path.join(args.output, formatted_timestamp, category, resourceType), exist_ok=True)
+ for root, dirs, files in os.walk(os.path.join(args.output, category, resourceType, "templates", "bicep")):
+ for file in files:
+ os.remove(os.path.join(root, file))
+
+ alert_file_names = []
for alert in data[category][resourceType]:
arm_template_type = ""
+ alert_file_name = re.sub(r'[^a-zA-Z0-9-]', '', alert['name']) + '_' + alert['guid']
+
if alert["type"] == "Metric":
if 'criterionType' in alert["properties"]:
if alert["properties"]["criterionType"] == "StaticThresholdCriterion":
@@ -114,6 +118,8 @@ def main():
template_type = "activity-resourcehealth"
elif alert["properties"]["category"] == "ServiceHealth":
template_type = "activity-servicehealth"
+ else:
+ continue
if template_type == "":
print(f"Template not found for alert {alert['guid']}")
@@ -125,21 +131,21 @@ def main():
arm_template = arm_template.replace("##TELEMETRY_PID##", args.telemetry_pid)
bicep_template = bicep_template.replace("##TELEMETRY_PID##", args.telemetry_pid)
- if 'description' in alert and alert["description"]:
+ if 'description' in alert and alert["description"] is not None:
arm_template = arm_template.replace("##DESCRIPTION##", alert["description"])
bicep_template = bicep_template.replace("##DESCRIPTION##", alert["description"])
else:
arm_template = arm_template.replace("##DESCRIPTION##", "")
bicep_template = bicep_template.replace("##DESCRIPTION##", "")
- if 'severity' in alert["properties"] and alert["properties"]["severity"]:
+ if 'severity' in alert["properties"] and alert["properties"]["severity"] is not None:
arm_template = arm_template.replace("##SEVERITY##", str(int(alert["properties"]["severity"])))
bicep_template = bicep_template.replace("##SEVERITY##", str(int(alert["properties"]["severity"])))
else:
arm_template = arm_template.replace("##SEVERITY##", "")
bicep_template = bicep_template.replace("##SEVERITY##", "")
- if 'autoMitigate' in alert["properties"] and alert["properties"]["autoMitigate"]:
+ if 'autoMitigate' in alert["properties"] and alert["properties"]["autoMitigate"] is not None:
if alert["properties"]["autoMitigate"] == True:
arm_template = arm_template.replace("##AUTO_MITIGATE##", "true")
bicep_template = bicep_template.replace("##AUTO_MITIGATE##", "true")
@@ -150,7 +156,7 @@ def main():
arm_template = arm_template.replace("##AUTO_MITIGATE##", "")
bicep_template = bicep_template.replace("##AUTO_MITIGATE##", "")
- if 'query' in alert["properties"] and alert["properties"]["query"]:
+ if 'query' in alert["properties"] and alert["properties"]["query"] is not None:
arm_template = arm_template.replace("##QUERY##", json.dumps(alert["properties"]["query"].replace("\n", " ")))
query = alert["properties"]["query"].replace("\n", " ").replace("'", "\\'")
bicep_template = bicep_template.replace("##QUERY##", query)
@@ -158,77 +164,83 @@ def main():
arm_template = arm_template.replace("##QUERY##", "")
bicep_template = bicep_template.replace("##QUERY##", "")
- if 'metricMeasureColumn' in alert["properties"] and alert["properties"]["metricMeasureColumn"]:
+ if 'metricName' in alert["properties"] and alert["properties"]["metricName"] is not None:
+ arm_template = arm_template.replace("##METRIC_NAME##", alert["properties"]["metricName"])
+ bicep_template = bicep_template.replace("##METRIC_NAME##", alert["properties"]["metricName"])
+ else:
+ arm_template = arm_template.replace("##METRIC_NAME##", "")
+ bicep_template = bicep_template.replace("##METRIC_NAME##", "")
+
+ if 'metricMeasureColumn' in alert["properties"] and alert["properties"]["metricMeasureColumn"] is not None:
arm_template = arm_template.replace("##METRIC_MEASURE_COLUMN##", alert["properties"]["metricMeasureColumn"])
bicep_template = bicep_template.replace("##METRIC_MEASURE_COLUMN##", alert["properties"]["metricMeasureColumn"])
else:
arm_template = arm_template.replace("##METRIC_MEASURE_COLUMN##", "")
bicep_template = bicep_template.replace("##METRIC_MEASURE_COLUMN##", "")
- if 'resouceIdColumn' in alert["properties"] and alert["properties"]["resouceIdColumn"]:
+ if 'resouceIdColumn' in alert["properties"] and alert["properties"]["resouceIdColumn"] is not None:
arm_template = arm_template.replace("##RESOURCE_ID_COLUMN##", alert["properties"]["resouceIdColumn"])
bicep_template = bicep_template.replace("##RESOURCE_ID_COLUMN##", alert["properties"]["resouceIdColumn"])
else:
arm_template = arm_template.replace("##RESOURCE_ID_COLUMN##", "")
bicep_template = bicep_template.replace("##RESOURCE_ID_COLUMN##", "")
- if 'operator' in alert["properties"] and alert["properties"]["operator"]:
+ if 'operator' in alert["properties"] and alert["properties"]["operator"] is not None:
arm_template = arm_template.replace("##OPERATOR##", alert["properties"]["operator"])
bicep_template = bicep_template.replace("##OPERATOR##", alert["properties"]["operator"])
else:
arm_template = arm_template.replace("##OPERATOR##", "")
bicep_template = bicep_template.replace("##OPERATOR##", "")
- if 'failingPeriods' in alert["properties"] and alert["properties"]["failingPeriods"]["numberOfEvaluationPeriods"]:
+ if 'failingPeriods' in alert["properties"] and alert["properties"]["failingPeriods"]["numberOfEvaluationPeriods"] is not None:
arm_template = arm_template.replace("##FAILING_PERIODS_NUMBER_OF_EVALUATION_PERIODS##", str(int(alert["properties"]["failingPeriods"]["numberOfEvaluationPeriods"])))
bicep_template = bicep_template.replace("##FAILING_PERIODS_NUMBER_OF_EVALUATION_PERIODS##", str(int(alert["properties"]["failingPeriods"]["numberOfEvaluationPeriods"])))
else:
arm_template = arm_template.replace("##FAILING_PERIODS_NUMBER_OF_EVALUATION_PERIODS##", "")
bicep_template = bicep_template.replace("##FAILING_PERIODS_NUMBER_OF_EVALUATION_PERIODS##", "")
- if 'failingPeriods' in alert["properties"] and alert["properties"]["failingPeriods"]["numberOfEvaluationPeriods"]:
+ if 'failingPeriods' in alert["properties"] and alert["properties"]["failingPeriods"]["numberOfEvaluationPeriods"] is not None:
arm_template = arm_template.replace("##FAILING_PERIODS_MIN_FAILING_PERIODS_TO_ALERT##", str(int(alert["properties"]["failingPeriods"]["minFailingPeriodsToAlert"])))
bicep_template = bicep_template.replace("##FAILING_PERIODS_MIN_FAILING_PERIODS_TO_ALERT##", str(int(alert["properties"]["failingPeriods"]["minFailingPeriodsToAlert"])))
else:
arm_template = arm_template.replace("##FAILING_PERIODS_MIN_FAILING_PERIODS_TO_ALERT##", "")
bicep_template = bicep_template.replace("##FAILING_PERIODS_MIN_FAILING_PERIODS_TO_ALERT##", "")
- if 'threshold' in alert["properties"] and alert["properties"]["threshold"]:
- arm_template = arm_template.replace("##THRESHOLD##", str(int(alert["properties"]["threshold"])))
- bicep_template = bicep_template.replace("##THRESHOLD##", str(int(alert["properties"]["threshold"])))
+ if 'threshold' in alert["properties"] and alert["properties"]["threshold"] is not None:
+ # Convert the threshold to a float
+ threshold = float(alert["properties"]["threshold"])
+ threshold = str(round(threshold))
+ if threshold == "":
+ raise Exception(f"Threshold is empty for alert {alert['guid']}")
+
+ arm_template = arm_template.replace("##THRESHOLD##", threshold)
+ bicep_template = bicep_template.replace("##THRESHOLD##", threshold)
else:
arm_template = arm_template.replace("##THRESHOLD##", "")
bicep_template = bicep_template.replace("##THRESHOLD##", "")
- if 'timeAggregation' in alert["properties"] and alert["properties"]["timeAggregation"]:
+ if 'timeAggregation' in alert["properties"] and alert["properties"]["timeAggregation"] is not None:
arm_template = arm_template.replace("##TIME_AGGREGATION##", alert["properties"]["timeAggregation"])
bicep_template = bicep_template.replace("##TIME_AGGREGATION##", alert["properties"]["timeAggregation"])
else:
arm_template = arm_template.replace("##TIME_AGGREGATION##", "")
bicep_template = bicep_template.replace("##TIME_AGGREGATION##", "")
- if 'windowSize' in alert["properties"] and alert["properties"]["windowSize"]:
+ if 'windowSize' in alert["properties"] and alert["properties"]["windowSize"] is not None:
arm_template = arm_template.replace("##WINDOW_SIZE##", alert["properties"]["windowSize"])
bicep_template = bicep_template.replace("##WINDOW_SIZE##", alert["properties"]["windowSize"])
else:
arm_template = arm_template.replace("##WINDOW_SIZE##", "")
bicep_template = bicep_template.replace("##WINDOW_SIZE##", "")
- if 'evaluationFrequency' in alert["properties"] and alert["properties"]["evaluationFrequency"]:
+ if 'evaluationFrequency' in alert["properties"] and alert["properties"]["evaluationFrequency"] is not None:
arm_template = arm_template.replace("##EVALUATION_FREQUENCY##", alert["properties"]["evaluationFrequency"])
bicep_template = bicep_template.replace("##EVALUATION_FREQUENCY##", alert["properties"]["evaluationFrequency"])
else:
arm_template = arm_template.replace("##EVALUATION_FREQUENCY##", "")
bicep_template = bicep_template.replace("##EVALUATION_FREQUENCY##", "")
- if 'metricName' in alert["properties"] and alert["properties"]["metricName"]:
- arm_template = arm_template.replace("##METRIC_NAME##", alert["properties"]["metricName"])
- bicep_template = bicep_template.replace("##METRIC_NAME##", alert["properties"]["metricName"])
- else:
- arm_template = arm_template.replace("##METRIC_NAME##", "")
- bicep_template = bicep_template.replace("##METRIC_NAME##", "")
-
- if 'dimensions' in alert["properties"] and "dimensions" in alert["properties"]:
+ if 'dimensions' in alert["properties"] and alert["properties"]["dimensions"] is not None:
arm_template = arm_template.replace("##DIMENSIONS##", json.dumps(alert["properties"]["dimensions"]))
dimensions = []
@@ -246,17 +258,17 @@ def main():
bicep_template = bicep_template.replace("##DIMENSIONS##", "".join(dimensions))
else:
- arm_template = arm_template.replace("##DIMENSIONS##", "")
- bicep_template = bicep_template.replace("##DIMENSIONS##", "")
+ arm_template = arm_template.replace("##DIMENSIONS##", "[]")
+ bicep_template = bicep_template.replace("##DIMENSIONS##", "[]")
- if 'operationName' in alert["properties"] and alert["properties"]["operationName"]:
+ if 'operationName' in alert["properties"] and alert["properties"]["operationName"] is not None:
arm_template = arm_template.replace("##OPERATION_NAME##", alert["properties"]["operationName"])
bicep_template = bicep_template.replace("##OPERATION_NAME##", alert["properties"]["operationName"])
else:
arm_template = arm_template.replace("##OPERATION_NAME##", "")
bicep_template = bicep_template.replace("##OPERATION_NAME##", "")
- if 'status' in alert["properties"] and alert["properties"]["status"]:
+ if 'status' in alert["properties"] and alert["properties"]["status"] is not None:
arm_template = arm_template.replace("##STATUS##", json.dumps(alert["properties"]["status"]))
statuses = []
@@ -268,7 +280,7 @@ def main():
arm_template = arm_template.replace("##STATUS##", "")
bicep_template = bicep_template.replace("##STATUS##", "")
- if 'causes' in alert["properties"] and alert["properties"]["causes"]:
+ if 'causes' in alert["properties"] and alert["properties"]["causes"] is not None:
causes = []
for cause in alert["properties"]["causes"]:
@@ -293,7 +305,7 @@ def main():
arm_template = arm_template.replace("##CAUSES##", "")
bicep_template = bicep_template.replace("##CAUSES##", "")
- if 'currentHealthStatus' in alert["properties"] and alert["properties"]["currentHealthStatus"]:
+ if 'currentHealthStatus' in alert["properties"] and alert["properties"]["currentHealthStatus"] is not None:
currentHealthStatuses = []
for currentHealthStatus in alert["properties"]["currentHealthStatus"]:
currentHealthStatuses.append(f"""
@@ -317,19 +329,24 @@ def main():
arm_template = arm_template.replace("##CURRENT_HEALTH_STATUS##", "")
bicep_template = bicep_template.replace("##CURRENT_HEALTH_STATUS##", "")
- if 'incidentType' in alert["properties"] and alert["properties"]["incidentType"]:
+ if 'incidentType' in alert["properties"] and alert["properties"]["incidentType"] is not None:
arm_template = arm_template.replace("##INCIDENT_TYPE##", alert["properties"]["incidentType"])
bicep_template = bicep_template.replace("##INCIDENT_TYPE##", alert["properties"]["incidentType"])
else:
arm_template = arm_template.replace("##INCIDENT_TYPE##", "")
bicep_template = bicep_template.replace("##INCIDENT_TYPE##", "")
- # Save the ARM template
- with open(os.path.join(args.output, formatted_timestamp, category, resourceType, alert['guid'] + '.json'), 'w') as f:
+ # Check if alert name already exists
+ if alert_file_name in alert_file_names:
+ raise Exception(f"Alert name {alert_file_name} already exists in the list of alerts for {category}/{resourceType}")
+ else:
+ alert_file_names.append(alert_file_name)
+
+ with open(os.path.join(args.output, category, resourceType, "templates", "arm", alert_file_name + '.json'), 'w') as f:
f.write(arm_template)
# Save the Bicep template
- with open(os.path.join(args.output, formatted_timestamp, category, resourceType, alert['guid'] + '.bicep'), 'w') as f:
+ with open(os.path.join(args.output, category, resourceType, "templates", "bicep", alert_file_name + '.bicep'), 'w') as f:
f.write(bicep_template)
if __name__ == '__main__':
diff --git a/tooling/generate-templates/templates/arm/activity-administrative.json b/tooling/generate-templates/templates/arm/activity-administrative.json
new file mode 100644
index 000000000..a48293408
--- /dev/null
+++ b/tooling/generate-templates/templates/arm/activity-administrative.json
@@ -0,0 +1,95 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "##DESCRIPTION##",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('##TELEMETRY_PID##-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "Administrative"
+ },
+ {
+ "field": "operationName",
+ "equals": "##OPERATION_NAME##"
+ },
+ {
+ "field": "status",
+ "containsAny": ##STATUS##
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/tooling/generate-templates/templates/arm/activity-resourcehealth.json b/tooling/generate-templates/templates/arm/activity-resourcehealth.json
new file mode 100644
index 000000000..a25574c0f
--- /dev/null
+++ b/tooling/generate-templates/templates/arm/activity-resourcehealth.json
@@ -0,0 +1,95 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "##DESCRIPTION##",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('##TELEMETRY_PID##-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "ResourceHealth"
+ },
+ {
+ "anyOf": [##CAUSES##
+ ]
+ },
+ {
+ "anyOf": [##CURRENT_HEALTH_STATUS##
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/tooling/generate-templates/templates/arm/activity-servicehealth.json b/tooling/generate-templates/templates/arm/activity-servicehealth.json
new file mode 100644
index 000000000..796bd3784
--- /dev/null
+++ b/tooling/generate-templates/templates/arm/activity-servicehealth.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique name (within the Resource Group) for the Activity log alert."
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "##DESCRIPTION##",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Indicates whether or not the alert is enabled."
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('##TELEMETRY_PID-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/activityLogAlerts",
+ "apiVersion": "2017-04-01",
+ "name": "[parameters('alertName')]",
+ "location": "Global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": [
+ "[subscription().id]"
+ ],
+ "enabled": "[parameters('isEnabled')]",
+ "condition": {
+ "allOf": [
+ {
+ "field": "category",
+ "equals": "ServiceHealth"
+ },
+ {
+ "field": "properties.incidentType",
+ "equals": "##INCIDENT_TYPE##"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/tooling/generate-templates/templates/arm/log.json b/tooling/generate-templates/templates/arm/log.json
new file mode 100644
index 000000000..c2a583ca8
--- /dev/null
+++ b/tooling/generate-templates/templates/arm/log.json
@@ -0,0 +1,256 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "##DESCRIPTION##",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "checkWorkspaceAlertsStorageConfigured": {
+ "type": "bool",
+ "defaultValue": false,
+ "metadata": {
+ "description": "Specifies whether to check linked storage and fail creation if the storage was not found"
+ }
+ },
+ "resourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
+ }
+ },
+ "muteActionsDuration": {
+ "type": "string",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H"
+ ],
+ "metadata": {
+ "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired."
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": ##SEVERITY##,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "autoMitigate": {
+ "type": "bool",
+ "defaultValue": ##AUTO_MITIGATE##,
+ "metadata": {
+ "description": "Specifies whether the alert will automatically resolve"
+ }
+ },
+ "query": {
+ "type": "string",
+ "minLength": 1,
+ "defaultValue": ##QUERY##,
+ "metadata": {
+ "description": "Name of the metric used in the comparison to activate the alert."
+ }
+ },
+ "metricMeasureColumn": {
+ "type": "string",
+ "defaultValue": "##METRIC_MEASURE_COLUMN##",
+ "metadata": {
+ "description": "Name of the measure column used in the alert evaluation."
+ }
+ },
+ "resourceIdColumn": {
+ "type": "string",
+ "defaultValue": "##RESOURCE_ID_COLUMN##",
+ "metadata": {
+ "description": "Name of the resource ID column used in the alert targeting the alerts."
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "##OPERATOR##",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "##THRESHOLD##",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": ##FAILING_PERIODS_NUMBER_OF_EVALUATION_PERIODS##,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": ##FAILING_PERIODS_MIN_FAILING_PERIODS_TO_ALERT##,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "##TIME_AGGREGATION##",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "##WINDOW_SIZE##",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "##EVALUATION_FREQUENCY##",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('##TELEMETRY_PID##-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/scheduledQueryRules",
+ "apiVersion": "2021-08-01",
+ "name": "[parameters('alertName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "scopes": [
+ "[parameters('resourceId')]"
+ ],
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "allOf": [
+ {
+ "query": "[parameters('query')]",
+ "metricMeasureColumn": "[parameters('metricMeasureColumn')]",
+ "resourceIdColumn": "[parameters('resourceIdColumn')]",
+ "dimensions": ##DIMENSIONS##,
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ }
+ }
+ ]
+ },
+ "muteActionsDuration": "[parameters('muteActionsDuration')]",
+ "autoMitigate": "[parameters('autoMitigate')]",
+ "checkWorkspaceAlertsStorageConfigured": "[parameters('checkWorkspaceAlertsStorageConfigured')]"
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/tooling/generate-templates/templates/arm/metric-dynamic.json b/tooling/generate-templates/templates/arm/metric-dynamic.json
new file mode 100644
index 000000000..f7184178f
--- /dev/null
+++ b/tooling/generate-templates/templates/arm/metric-dynamic.json
@@ -0,0 +1,219 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "##DESCRIPTION##",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": ##SEVERITY##,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "##OPERATOR##",
+ "allowedValues": [
+ "GreaterThan",
+ "LessThan",
+ "GreaterOrLessThan"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "alertSensitivity": {
+ "type": "string",
+ "defaultValue": "##ALERT_SENSITIVITY##",
+ "allowedValues": [
+ "High",
+ "Medium",
+ "Low"
+ ],
+ "metadata": {
+ "description": "Tunes how 'noisy' the Dynamic Thresholds alerts will be: 'High' will result in more alerts while 'Low' will result in fewer alerts."
+ }
+ },
+ "numberOfEvaluationPeriods": {
+ "type": "int",
+ "defaultValue": ##FAILING_PERIODS_NUMBER_OF_EVALUATION_PERIODS##,
+ "metadata": {
+ "description": "The number of periods to check in the alert evaluation."
+ }
+ },
+ "minFailingPeriodsToAlert": {
+ "type": "int",
+ "defaultValue": ##FAILING_PERIODS_MIN_FAILING_PERIODS_TO_ALERT##,
+ "metadata": {
+ "description": "The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods)."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "##TIME_AGGREGATION##",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "##WINDOW_SIZE##",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "##EVALUATION_FREQUENCY##",
+ "allowedValues": [
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('##TELEMETRY_PID##-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "criterionType": "DynamicThresholdCriterion",
+ "name": "1st criterion",
+ "metricName": "##METRIC_NAME##",
+ "dimensions": ##DIMENSIONS##,
+ "operator": "[parameters('operator')]",
+ "alertSensitivity": "[parameters('alertSensitivity')]",
+ "failingPeriods": {
+ "numberOfEvaluationPeriods": "[parameters('numberOfEvaluationPeriods')]",
+ "minFailingPeriodsToAlert": "[parameters('minFailingPeriodsToAlert')]"
+ },
+ "timeAggregation": "[parameters('timeAggregation')]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/tooling/generate-templates/templates/arm/metric-static.json b/tooling/generate-templates/templates/arm/metric-static.json
new file mode 100644
index 000000000..01d14e539
--- /dev/null
+++ b/tooling/generate-templates/templates/arm/metric-static.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "alertName": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the alert"
+ }
+ },
+ "alertDescription": {
+ "type": "string",
+ "defaultValue": "##DESCRIPTION##",
+ "metadata": {
+ "description": "Description of alert"
+ }
+ },
+ "targetResourceId": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "List of Azure resource Ids seperated by a comma. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name"
+ }
+ },
+ "targetResourceRegion": {
+ "type": "string",
+ "metadata": {
+ "description": "Azure region in which target resources to be monitored are in (without spaces). For example: EastUS"
+ }
+ },
+ "targetResourceType": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Resource type of target resources to be monitored."
+ }
+ },
+ "isEnabled": {
+ "type": "bool",
+ "defaultValue": true,
+ "metadata": {
+ "description": "Specifies whether the alert is enabled"
+ }
+ },
+ "alertSeverity": {
+ "type": "int",
+ "defaultValue": ##SEVERITY##,
+ "allowedValues": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "metadata": {
+ "description": "Severity of alert {0,1,2,3,4}"
+ }
+ },
+ "operator": {
+ "type": "string",
+ "defaultValue": "##OPERATOR##",
+ "allowedValues": [
+ "Equals",
+ "GreaterThan",
+ "GreaterThanOrEqual",
+ "LessThan",
+ "LessThanOrEqual"
+ ],
+ "metadata": {
+ "description": "Operator comparing the current value with the threshold value."
+ }
+ },
+ "threshold": {
+ "type": "string",
+ "defaultValue": "##THRESHOLD##",
+ "metadata": {
+ "description": "The threshold value at which the alert is activated."
+ }
+ },
+ "timeAggregation": {
+ "type": "string",
+ "defaultValue": "##TIME_AGGREGATION##",
+ "allowedValues": [
+ "Average",
+ "Minimum",
+ "Maximum",
+ "Total",
+ "Count"
+ ],
+ "metadata": {
+ "description": "How the data that is collected should be combined over time."
+ }
+ },
+ "windowSize": {
+ "type": "string",
+ "defaultValue": "##WINDOW_SIZE##",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H",
+ "PT6H",
+ "PT12H",
+ "PT24H",
+ "PT1D"
+ ],
+ "metadata": {
+ "description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
+ }
+ },
+ "evaluationFrequency": {
+ "type": "string",
+ "defaultValue": "##EVALUATION_FREQUENCY##",
+ "allowedValues": [
+ "PT1M",
+ "PT5M",
+ "PT15M",
+ "PT30M",
+ "PT1H"
+ ],
+ "metadata": {
+ "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
+ }
+ },
+ "currentDateTimeUtcNow": {
+ "type": "string",
+ "defaultValue": "[utcNow()]",
+ "metadata": {
+ "description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
+ }
+ },
+ "telemetryOptOut": {
+ "type": "string",
+ "defaultValue": "No",
+ "allowedValues": [
+ "Yes",
+ "No"
+ ],
+ "metadata": {
+ "description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
+ }
+ }
+ },
+ "variables": {
+ "pidDeploymentName": "[take(concat('##TELEMETRY_PID##-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]",
+ "varTargetResourceId": "[split(parameters('targetResourceId'), ',')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Insights/metricAlerts",
+ "apiVersion": "2018-03-01",
+ "name": "[parameters('alertName')]",
+ "location": "global",
+ "tags": {
+ "_deployed_by_amba": true
+ },
+ "properties": {
+ "description": "[parameters('alertDescription')]",
+ "scopes": "[variables('varTargetResourceId')]",
+ "targetResourceType": "[parameters('targetResourceType')]",
+ "targetResourceRegion": "[parameters('targetResourceRegion')]",
+ "severity": "[parameters('alertSeverity')]",
+ "enabled": "[parameters('isEnabled')]",
+ "evaluationFrequency": "[parameters('evaluationFrequency')]",
+ "windowSize": "[parameters('windowSize')]",
+ "criteria": {
+ "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
+ "allOf": [
+ {
+ "name": "1st criterion",
+ "metricName": "##METRIC_NAME##",
+ "dimensions": ##DIMENSIONS##,
+ "operator": "[parameters('operator')]",
+ "threshold": "[parameters('threshold')]",
+ "timeAggregation": "[parameters('timeAggregation')]",
+ "criterionType": "StaticThresholdCriterion"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "condition": "[equals(parameters('telemetryOptOut'), 'No')]",
+ "apiVersion": "2020-06-01",
+ "name": "[variables('pidDeploymentName')]",
+ "type": "Microsoft.Resources/deployments",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": []
+ }
+ }
+ }
+ ]
+}
diff --git a/tooling/generate-templates/templates/bicep/activity-administrative.bicep b/tooling/generate-templates/templates/bicep/activity-administrative.bicep
new file mode 100644
index 000000000..53c404616
--- /dev/null
+++ b/tooling/generate-templates/templates/bicep/activity-administrative.bicep
@@ -0,0 +1,68 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = '##DESCRIPTION##'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'Administrative'
+ }
+ {
+ field: 'operationName'
+ equals: '##OPERATION_NAME##'
+ }
+ {
+ field: 'status'
+ containsAny: ##STATUS##
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = '##TELEMETRY_PID##-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/tooling/generate-templates/templates/bicep/activity-resourcehealth.bicep b/tooling/generate-templates/templates/bicep/activity-resourcehealth.bicep
new file mode 100644
index 000000000..e993691b9
--- /dev/null
+++ b/tooling/generate-templates/templates/bicep/activity-resourcehealth.bicep
@@ -0,0 +1,66 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = '##DESCRIPTION##'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ field: 'category'
+ equals: 'ResourceHealth'
+ }
+ {
+ anyOf: [##CAUSES##
+ ]
+ }
+ {
+ anyOf: [##CURRENT_HEALTH_STATUS##
+ ]
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = '##TELEMETRY_PID##-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/tooling/generate-templates/templates/bicep/activity-servicehealth.bicep b/tooling/generate-templates/templates/bicep/activity-servicehealth.bicep
new file mode 100644
index 000000000..36e9470f7
--- /dev/null
+++ b/tooling/generate-templates/templates/bicep/activity-servicehealth.bicep
@@ -0,0 +1,64 @@
+@description('Unique name (within the Resource Group) for the Activity log alert.')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = '##DESCRIPTION##'
+
+@description('Indicates whether or not the alert is enabled.')
+param isEnabled bool = true
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource symbolicname 'Microsoft.Insights/activityLogAlerts@2023-01-01-preview' = {
+ name: alertName
+ location: 'Global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: [
+ subscription().id
+ ]
+ enabled: isEnabled
+ condition: {
+ allOf: [
+ {
+ {
+ field: 'category'
+ equals: 'ServiceHealth'
+ }
+ {
+ field: 'properties.incidentType'
+ equals: '##INCIDENT_TYPE##'
+ }
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = '##TELEMETRY_PID##-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/tooling/generate-templates/templates/bicep/log.bicep b/tooling/generate-templates/templates/bicep/log.bicep
new file mode 100644
index 000000000..7387bc999
--- /dev/null
+++ b/tooling/generate-templates/templates/bicep/log.bicep
@@ -0,0 +1,168 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = '##DESCRIPTION##'
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Specifies whether to check linked storage and fail creation if the storage was not found')
+param checkWorkspaceAlertsStorageConfigured bool = false
+
+@description('Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz')
+@minLength(1)
+param resourceId string
+
+@description('Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+])
+param muteActionsDuration string
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = ##SEVERITY##
+
+@description('Specifies whether the alert will automatically resolve')
+param autoMitigate bool = ##AUTO_MITIGATE##
+
+@description('Name of the metric used in the comparison to activate the alert.')
+@minLength(1)
+param query string = '##QUERY##'
+
+@description('Name of the measure column used in the alert evaluation.')
+param metricMeasureColumn string = '##METRIC_MEASURE_COLUMN##'
+
+@description('Name of the resource ID column used in the alert targeting the alerts.')
+param resourceIdColumn string = '##RESOURCE_ID_COLUMN##'
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = '##OPERATOR##'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = ##THRESHOLD##
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = ##FAILING_PERIODS_NUMBER_OF_EVALUATION_PERIODS##
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = ##FAILING_PERIODS_MIN_FAILING_PERIODS_TO_ALERT##
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = '##TIME_AGGREGATION##'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = '##WINDOW_SIZE##'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = '##EVALUATION_FREQUENCY##'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource alert 'Microsoft.Insights/scheduledQueryRules@2021-08-01' = {
+ name: alertName
+ location: resourceGroup().location
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ severity: alertSeverity
+ enabled: isEnabled
+ scopes: [
+ resourceId
+ ]
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ allOf: [
+ {
+ query: query
+ metricMeasureColumn: metricMeasureColumn
+ resourceIdColumn: resourceIdColumn
+ dimensions: [##DIMENSIONS##]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ }
+ ]
+ }
+ muteActionsDuration: muteActionsDuration
+ autoMitigate: autoMitigate
+ checkWorkspaceAlertsStorageConfigured: checkWorkspaceAlertsStorageConfigured
+ }
+}
+
+var ambaTelemetryPidName = '##TELEMETRY_PID##-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/tooling/generate-templates/templates/bicep/metric-dynamic.bicep b/tooling/generate-templates/templates/bicep/metric-dynamic.bicep
new file mode 100644
index 000000000..77a4a28da
--- /dev/null
+++ b/tooling/generate-templates/templates/bicep/metric-dynamic.bicep
@@ -0,0 +1,147 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = '##DESCRIPTION##'
+
+@description('array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = ##SEVERITY##
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'GreaterThan'
+ 'LessThan'
+ 'GreaterOrLessThan'
+])
+param operator string = '##OPERATOR##'
+
+@description('Tunes how \'noisy\' the Dynamic Thresholds alerts will be: \'High\' will result in more alerts while \'Low\' will result in fewer alerts.')
+@allowed([
+ 'High'
+ 'Medium'
+ 'Low'
+])
+param alertSensitivity string = '##ALERT_SENSITIVITY##'
+
+@description('The number of periods to check in the alert evaluation.')
+param numberOfEvaluationPeriods int = ##FAILING_PERIODS_NUMBER_OF_EVALUATION_PERIODS##
+
+@description('The number of unhealthy periods to alert on (must be lower or equal to numberOfEvaluationPeriods).')
+param minFailingPeriodsToAlert int = ##FAILING_PERIODS_MIN_FAILING_PERIODS_TO_ALERT##
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = '##TIME_AGGREGATION##'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one hour. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = '##WINDOW_SIZE##'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = '##EVALUATION_FREQUENCY##'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ criterionType: 'DynamicThresholdCriterion'
+ name: '1st criterion'
+ metricName: '##METRIC_NAME##'
+ dimensions: [##DIMENSIONS##]
+ operator: operator
+ alertSensitivity: alertSensitivity
+ failingPeriods: {
+ numberOfEvaluationPeriods: numberOfEvaluationPeriods
+ minFailingPeriodsToAlert: minFailingPeriodsToAlert
+ }
+ timeAggregation: timeAggregation
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = '##TELEMETRY_PID##-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}
diff --git a/tooling/generate-templates/templates/bicep/metric-static.bicep b/tooling/generate-templates/templates/bicep/metric-static.bicep
new file mode 100644
index 000000000..b4511d07d
--- /dev/null
+++ b/tooling/generate-templates/templates/bicep/metric-static.bicep
@@ -0,0 +1,135 @@
+@description('Name of the alert')
+@minLength(1)
+param alertName string
+
+@description('Description of alert')
+param alertDescription string = '##DESCRIPTION##'
+
+@description('Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name')
+@minLength(1)
+param targetResourceId array
+
+@description('Azure region in which target resources to be monitored are in (without spaces). For example: EastUS')
+param targetResourceRegion string
+
+@description('Resource type of target resources to be monitored.')
+@minLength(1)
+param targetResourceType string
+
+@description('Specifies whether the alert is enabled')
+param isEnabled bool = true
+
+@description('Severity of alert {0,1,2,3,4}')
+@allowed([
+ 0
+ 1
+ 2
+ 3
+ 4
+])
+param alertSeverity int = ##SEVERITY##
+
+@description('Operator comparing the current value with the threshold value.')
+@allowed([
+ 'Equals'
+ 'GreaterThan'
+ 'GreaterThanOrEqual'
+ 'LessThan'
+ 'LessThanOrEqual'
+])
+param operator string = '##OPERATOR##'
+
+@description('The threshold value at which the alert is activated.')
+param threshold int = ##THRESHOLD##
+
+@description('How the data that is collected should be combined over time.')
+@allowed([
+ 'Average'
+ 'Minimum'
+ 'Maximum'
+ 'Total'
+ 'Count'
+])
+param timeAggregation string = '##TIME_AGGREGATION##'
+
+@description('Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format.')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+ 'PT6H'
+ 'PT12H'
+ 'PT24H'
+ 'P1D'
+])
+param windowSize string = '##WINDOW_SIZE##'
+
+@description('how often the metric alert is evaluated represented in ISO 8601 duration format')
+@allowed([
+ 'PT1M'
+ 'PT5M'
+ 'PT15M'
+ 'PT30M'
+ 'PT1H'
+])
+param evaluationFrequency string = '##EVALUATION_FREQUENCY##'
+
+@description('"The current date and time using the utcNow function. Used for deployment name uniqueness')
+param currentDateTimeUtcNow string = utcNow()
+
+@description('The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry.')
+@allowed([
+ 'Yes'
+ 'No'
+])
+param telemetryOptOut string = 'No'
+
+resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
+ name: alertName
+ location: 'global'
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ description: alertDescription
+ scopes: targetResourceId
+ targetResourceType: targetResourceType
+ targetResourceRegion: targetResourceRegion
+ severity: alertSeverity
+ enabled: isEnabled
+ evaluationFrequency: evaluationFrequency
+ windowSize: windowSize
+ criteria: {
+ 'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
+ allOf: [
+ {
+ name: '1st criterion'
+ metricName: '##METRIC_NAME##'
+ dimensions: [##DIMENSIONS##]
+ operator: operator
+ threshold: threshold
+ timeAggregation: timeAggregation
+ criterionType: 'StaticThresholdCriterion'
+ }
+ ]
+ }
+ }
+}
+
+var ambaTelemetryPidName = '##TELEMETRY_PID##-${uniqueString(resourceGroup().id, alertName, currentDateTimeUtcNow)}'
+resource ambaTelemetryPid 'Microsoft.Resources/deployments@2020-06-01' = if (telemetryOptOut == 'No') {
+ name: ambaTelemetryPidName
+ tags: {
+ _deployed_by_amba: 'true'
+ }
+ properties: {
+ mode: 'Incremental'
+ template: {
+ '$schema': 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#'
+ contentVersion: '1.0.0.0'
+ resources: []
+ }
+ }
+}