0

Is it possible to get the uptime of Azure VMSS Managed Instance via Azure REST API?

What is the optimal way to obtain this information programmatically?

GilliVilla
  • 4,998
  • 11
  • 55
  • 96

2 Answers2

0

This information will be available on Azure Monitor in the health section

https://learn.microsoft.com/en-us/azure/azure-monitor/insights/vminsights-health

However, I could not find the REST API related to it. Check if this one has the information you need:

https://learn.microsoft.com/en-us/rest/api/resourcehealth/availabilitystatuses/getbyresource

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
0

As I know, Azure stores the statuses of the VMSS such as the extension status, the instance current status and etc. And the configurations of the instance as the REST API describes.

So if you want to get the instance statuses, you can use the API Virtual Machine Scale Sets - Get. But I would recommend you get the API from the CLI command az vmss get-instance-view with parameter --debug, then you can get the API that can get the information of the special instance ID.

Charles Xu
  • 29,862
  • 2
  • 22
  • 39