- Introduction
- Prerequisites
- Set up Azure Monitor
- Set up Log Analytics
- Configure Log Analytics
- Visualize your Data
- Example
Azure Monitor can help improve the availability and performance of your solution. This service and associated tools can provide you with near real-time visibility into your edge modules. In particular, Log Analytics can help you keep track of resource and application performance. These services can be integrated with a variety of data visualization tools.
Make sure you have completed all the prerequisites in the Quickstart article
Follow these steps to setup Azure Monitor
You will need to include the APPLICATIONSINSIGHTS_CONNECTIONSTRING in your deployment manifest file.
"ai-pipeline": {
"version": "1.0",
"startupOrder": 1,
"env": {
"APPLICATIONINSIGHTS_CONNECTION_STRING": {
"value": "${APPLICATIONINSIGHTS_CONNECTION_STRING}"
}
Update your edge device with this information before proceeding.
Follow these steps to setup your Azure Log Analytics workspace
This article provides useful information about how to query your logs using Azure Log Analytics.
Review this article to learn how to create dashboards that visualize your Azure Log Analytics data.
Follow along with this example to get started with Azure Log Analytics.
-
Follow these steps to create a new Log Analytics workspace.
-
Follow these steps to create an Application Insights resource.
- Make sure to choose your newly created Log Analytics workspace when creating the resource.
- Copy your connection string.
-
Update your .env file with the connection string:
APPLICATIONINSIGHTS_CONNECTION_STRING="YOUR STRING HERE"
-
Regenerate your deployment manifest from the template (in VS Code, right click on the template and select "Generate IoT Edge Deployment Manifest").
-
Deploy (in VS Code, right click on the deployment manifest and select "Create Deployment for Single Device").
Return to your experience path to see how Azure Monitor and Log Analytics provide you with useful information about your solution.