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?
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?
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
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.