Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 3.12 KB

File metadata and controls

73 lines (49 loc) · 3.12 KB

How to include Azure Monitor to improve observability

Table of Contents

Introduction

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.

Prerequisites

Make sure you have completed all the prerequisites in the Quickstart article

Set up Azure Monitor

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.

Set up Azure Log Analytics

Follow these steps to setup your Azure Log Analytics workspace

Configure Azure Log Analytics

This article provides useful information about how to query your logs using Azure Log Analytics.

Visualize your data

Review this article to learn how to create dashboards that visualize your Azure Log Analytics data.

Example

Follow along with this example to get started with Azure Log Analytics.

  1. Follow these steps to create a new Log Analytics workspace.

  2. 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.
  3. Update your .env file with the connection string:

    APPLICATIONINSIGHTS_CONNECTION_STRING="YOUR STRING HERE"
  4. Regenerate your deployment manifest from the template (in VS Code, right click on the template and select "Generate IoT Edge Deployment Manifest").

  5. Deploy (in VS Code, right click on the deployment manifest and select "Create Deployment for Single Device").

Next steps

Return to your experience path to see how Azure Monitor and Log Analytics provide you with useful information about your solution.