Deploy an existing Sitecore instance on Azure with Azure Monitoring and Alerts Basic

Version: 10.4

The Azure Monitoring and Alerts Basic module uses Azure Monitor to track whether specific resources are performing within acceptable boundaries. Azure Monitor is a tool that combines Log Analytics and Application Insights to collect and analyze telemetry so you can better understand and maximize the performance of your applications. Different types of resources have different thresholds and different time periods to check for. By default, Azure Monitoring and Alerts Basic creates a number of alerts specifically for each of the Sitecore topologies.

Prerequisites

Before you can deploy your existing Sitecore environment on Azure with Azure Monitoring and Alerts Basic, you must have:

  • A Microsoft Azure® subscription and portal credentials.

  • A Sitecore™Experience Cloud instance on Azure. The supported topologies are XM, XP, and xDB. The support topologies support both Solr and Azure Cognitive Search.

  • A PowerShell that has the latest Azure PowerShell modules installed. The minimum module is version 6.0.0. To upgrade your PowerShell module, run:

    RequestResponse
    "Update-Module -Name
    AzureRM -RequiredVersion 6.0.0 -Force"
  • (Optional) If you require a fully functional Application Level Monitoring solution: Application Insights.

Obtain Azure resource group information

To identify the Resource group name, Resource group Azure subscription ID, and Application Insights location from the target Azure resource group, you must first download the Azure Monitoring and Alerts Basic ARM template.

When you have downloaded the template, to obtain the resource group information:

  1. In the Azure portal, log in.

  2. On the Microsoft Azure portal menu, click Resource groups to see the list of all available resource groups.

  3. Click the targeted resource group to see all of the available resources for that resource group.

    Azure portal resource groups.
  4. On the Resource groups page, click Overview, to view the:

    • Resource group name

    • Azure Subscription ID

    • Application Insights location

    Note

    Make a note of the resource group name and the subscription ID, as you will need them later to deploy the Azure Monitoring and Alerts Basic ARM templates.

    Azure Resource group details.

Fill in the ARM template parameters

Before you upload your ARM template to Blob storage, you must fill in the ARM template parameters.

To fill in the parameters:

  1. In Github, the Monitoring module, download the Azure Sitecore compatible Azure Monitoring and Alerts Basic package.

  2. Unzip the Azure Monitoring and Alerts Basic package, then open the azuredeploy.parameters.json file with a text editor such as Notepad++.

  3. Refer to the following table and enter the relevant value for each parameter:

    Parameter values for Azure Monitoring and Alerts Basic.

    Parameter

    Allowed values

    deploymentId

    Use the Resource group name or the Sitecore deployment ID if you have already deployed an existing Sitecore instance from Sitecore Azure Toolkit.

    omsWorkspaceMetricsRetentionDays

    Enter the custom metrics retention days. The value is in days = between 30 to 730.

    omsWorkspaceAlertRecipients

    Enter an email address. If you want to use more than one email address, then use a semi colon ; as a separator.

    omsWorkspaceLocation

    Specify the location where you want your log analytics provisioned. First check the regions that are supported.

    applicationInsightsLocation

    Specify the location where you want your Application Insights provisioned. First check the regions that are supported.

    searchProvider

    Specify your Sitecore instance search provider. Currently the available values are: Azure and Solr.

    Note

    This parameter is only available for Sitecore versions 8.2.7, 9.0.2, and all 9.1 and later topologies.

Upload the ARM templates to Blob storage (option 1)

To upload a generated ARM template to Blob storage, and copy the corresponding URL:

  1. In the Azure portal, on the Resource groups page, click the resource group that you want to create a storage account for, then click Add.

    Click Add
  2. In the Marketplace section, search for "storage account", click Storage account, then click Create.

    Create a storage account
  3. Under Create storage account, Instance details, fill in your details, and click Review + create, then review your details and click Create.

    Review your details and create a storage account
  4. In Resource groups, click the resource group you want to open, then, in Overview, under Name, click the storage account you want to open.

  5. Under Blob service, Blobs, click +Container, then, under New container, fill in the name of the new container, and click OK.

    Add a new container.
  6. In Resource groups, Blobs, click on the container that you have just created.

  7. In Overview, click Upload to upload the generated ARM templates.

    Upload ARM templates to a storage container
  8. In Overview, under Name, click azuredeploy.json.

  9. In the Properties section, in the URL field, copy the azuredeploy.json URL and record it for later when you deploy the Azure Monitoring and Alerts Basic ARM templates.

    Copy the azuredeploy.json URL
  10. Repeat steps 8 and 9 to copy the azuredeploy.parameters.json URL.

    Copy the azuredeploy.parameters.json URL

Deploy the Azure Monitoring and Alerts Basic ARM templates (option 2)

To deploy the Azure Monitoring and Alerts Basic ARM templates to an existing Sitecore instance:

  1. Open a PowerShell console.

  2. Use the Login-AzureRmAccount command to log in to your Azure account.

  3. In the following PowerShell script, pass in the values for the Resource Group name, Azure Subscription ID, the Blob storage account azuredeploy.json file URL, and the Blob storage account azuredeploy.parameters file URL:

    RequestResponse
    Set-AzureRMContext -SubscriptionId $SubscriptionId
    
    New-AzureRmResourceGroupDeployment -ResourceGroupName $ResourceGroupName
    -TemplateFile $AzuredeployFileURL  -TemplateParameterUri
    $AzuredeployParametersFileURL   -Verbose 
    Note

    Only use Application Insights location values if your target resource group has a Sitecore instance running within it, otherwise it will not work.

Clean up additional resources (optional)

After you have successfully provisioned Azure Monitoring and Alerts Basic to the targeted Azure resource group, to clean up additional resources:

Remove Azure Monitor from Sitecore

If you no longer require Azure Monitor, you can remove it.

Important

If you only want to remove the Azure Monitor resource group, do not delete the resource group it is within, otherwise you will also remove Sitecore. If this happens, you can Invoke the deployment command to redeploy Sitecore.

Delete the Application Insights availability alerts

To delete the Application Insights availability alerts:

  1. In the Microsoft Azure portal, click Resource groups to see all available resource groups.

  2. Click your deployed resource group to see all of the available resources for that group, then in Overview, select Application Insights.

    Azure Resource group, App Insights.
  3. In the menu on the left, click Availability, then Details to see all the Tier 4 alerts, the Availability test alert, or the Ping test alert.

  4. Under Available tests summary, to the right of the test you want to delete, click (...), and Delete.

    Delete the availability test.

Delete all associated metric alerts

To delete the associated metric alerts:

  1. In the Microsoft Azure portal, click Monitor, then Alerts.

    Monitor overview.
  2. Click Manage alert rules, then select the appropriate subscription and resource group to see all the Tier 1, Tier 2, and Tier 3 metric alerts.

    See the Tier metric alerts.
  3. Select the checkbox next to the metric alert that you want to delete, then click Delete.

    Delete the Monitor metric alert.

Delete the Search Services Performance overview

If you are using a Solr search provider with your Sitecore deployment, you must also delete the Search Services Performance view. To delete the Search Services Performance overview:

  1. In your OMS workspace, click the Performance Overview tile.

  2. In Performance Overview, click Edit.

  3. In View dashboard, click on the Search Services Performance overview, then click Delete view.

Do you have some feedback for us?

If you have suggestions for improving this article,