How to retrive live metrics data from azure,localy on your machine

Eugene Klottey Mensah 0 Reputation points
2023-11-03T10:34:19.9466667+00:00

I there a way to write a program or a script to access and retrieve azure application insights live metrics locally on your machine?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,267 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Boris Von Dahle 3,126 Reputation points
    2023-11-04T08:43:53.1433333+00:00

    Hello,

    Yes, you can retrieve the application insights live metrics from your machine.

    You will need to install the Azure Monitor SDK in the language you prefer.

    https://learn.microsoft.com/en-us/dotnet/api/overview/azure/monitor?view=azure-dotnet

    Then query the API for the metrics you want.This is the related documentation : https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics

    Once you have retrieved the live metrics data from Azure, you can process and display it locally on your machine. Depending on your requirements, you can choose to visualize the data in a console application, a web application, or any other suitable format.

    Hope this helps. If it does please mark the answer as acceptedso other users with same questions can find this topic

    Regards

    0 comments No comments

  2. Dillon Silzer 57,481 Reputation points
    2023-11-04T21:53:55.0233333+00:00

    Hi Eugene,

    You could build some reporting locally with PowerShell using Azure monitoring REST API:

    https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/rest-api-walkthrough?tabs=powershell#retrieve-metric-definitions

    Also, here is a walkthrough of creating a Service Principal and using it to call information:

    https://adatum.no/azure/azure-monitor/working-with-azure-monitor-rest-api


    If this is helpful please accept answer.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.