Availability and uptime report for Azure VMs

Ram Kumar Cheekoti 141 Reputation points
2024-03-12T10:20:57.29+00:00

Hi Team,

I require help in extracting availability and uptime reports for Azure VMs every 2 minutes using graphs and charts. Can you assist me in finding a solution for this?

The query below was run, but it only gave us Excel information, which isn't what we were seeking.

Heartbeat

// bin_at is used to set the time grain for 1 hour, starting exactly 24 hours ago

| Summarize heartbeatPerHour = count () by bin_at (TimeGenerated, 1h, ago (29d)), Computer

| Extend availablePerHour = if (heartbeatPerHour > 0, true, false)

| Summarize totalAvailableHours = countif (availablePerHour == true) by Computer

| Extend availabilityRate = totalAvailableHours * 100.0 / 696

FYI - We are using LA workspace and Microsoft monitoring agent.

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,140 questions
Azure Health Data Services
Azure Health Data Services
An Azure offering that provides a suite of purpose-built technologies for protected health information in the cloud.
157 questions
0 comments No comments
{count} votes

Accepted answer
  1. Clive Watson 6,266 Reputation points MVP
    2024-03-12T12:43:23.48+00:00

    Hello,

    I'd look to take the KQL query you have an put it into an Azure Workbook (or Azure Dashboard). There are examples in Azure Monitor - look for the "Workbooks" blade, or start here:

    https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-overview

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.