Hi Champs,
Today I am going to take you to the new product called Sumo Logic which we can integrate with Sitecore Azure PaaS for better log management.
Before starting you may have below two questions.
What is Sumo Logic?
Sumo Logic is a cloud-based machine data analytics company focusing on security, operations and BI use-cases. It provides log management and analytics services that leverage machine-generated big data to deliver real-time IT insights
Why Sumo Logic?
As per my experience Sumo Logic is coolest tool I ever seen for Log Management and monitoring. It gives a GUI based Live log management system by which you can track everything and not losing your time for checking logs from files. One more advantage is it alerts you one basis of exception captured in Log.
We will move without killing more time to the steps of configurations which are as below. Note all below steps you need to perform against your Sitecore Azure PaaS resource group.
Step 1. Configure Azure storage account
In this step you configure a storage account to which you will export monitoring data for your Azure service.
If you have a storage account with a container that you want to use for this purpose, make a note of its resource group, storage account name and container name and proceed to Step 2.
To configure an Azure storage account, do the following:
- Create a new storage account General-purpose v2 (GPv2) storage account. For instructions, see Create a storage account in Azure help.
- In the Azure portal, navigate to the storage account you just created (in the previous step).
- Select Blobs under Blob Service.
Make a note of the container name, you will need to supply later in this procedure.- Select + Container,
- Enter the Name
- Select Private for the Public Access Level.
- Click OK.
Step 2. Configure an HTTP source
In this step, you configure an HTTP source to receive logs from the Azure function.
- Select a hosted collector where you want to configure the HTTP source. If desired, create a new hosted collector, as described on Configure a Hosted Collector.
- Configure an HTTP source, as described on HTTP Logs and Metrics Source. Make a note of the URL for the source, you will need it in the next step.
Step 3. Configure Azure resources using ARM template
In this step, you use a Sumo-provided Azure Resource Manager (ARM) template to create an Event Hub, three Azure functions, Service Bus Queue, and a Storage Account.
- Download the blobreaderdeploy.json ARM template.
- Click Create a Resource, search for Template deployment in the Azure Portal, and then click Create.
- On the Custom deployment blade, click Build your own template in the editor.
- Copy the contents of the template and paste it into the editor window.
- Click Save.
- On the Custom deployment blade, do the following:
- Create a new Resource Group (recommended) or select an existing one.
- Choose Location.
- Set the values of the following parameters:
- SumoEndpointURL: URL for the HTTP source you configured in Step 2 above.
- StorageAccountName: Name of the storage account where you are storing logs from Azure Service, that you configured in Step 1 above.
- StorageAccountResourceGroupName: Name of the resource group of the storage account you configured in Step 1 above.
- Filter Prefix (Optional): If you want to filter logs from a specific container, enter the following, replacing the variable with your container name: /blobServices/default/containers/<container_name>/
- Select the check box to agree to the terms and conditions, and then click Purchase.
- Verify the deployment was successful by looking at Notifications at top right corner of Azure Portal.
- (Optional) In the same window, click Go to resource group to verify the all resources were successfully created, such as shown in the following example:
- Go to Storage accounts and search for sumobrlogs, then select sumobrlogs<random-string>.
- Under Table Service do the following:
- Click Tables.
- Click + Table.
- For Name, enter FileOffsetMap.
- Click OK.
Step 4. Push logs from Azure Service to Azure Blob Storage
This section describes how to push logs from an Azure service to Azure Blob Storage by configuring Diagnostic Logs. The instructions use the Azure Web Apps Service as an example.
- Login to the Azure Portal.
- Click AppServices > Your Function App > Diagnostic Logs under Monitoring.
- You will see the Diagnostic Logs blade. Enable Application Logging, Web Server Logging, or both, and click Storage Settings.
- Select the Storage Account whose connection string you configured in Step 1.
- In the Containers blade, select the container you created in Step 1.
- In the Diagnostic Logs blade, specify the Retention Period (Days), and click Save to exit Diagnostic Logs configuration.
Happy learning and innovating Sitecore.