0

enter image description here

Can any one tell me, how do I get the performance metrics data (Logical Disk Performance, CPU Utilization %) within Insights menu for a Virtual Machine using REST API or Nodejs SDK?

Param
  • 41
  • 1
  • 12
  • You can find `resourceUri` in Properties. Just copy and paste `Resource ID` ,and you can get the response. – Jason Pan Dec 02 '20 at 06:53

1 Answers1

0

The first way.

Access Metrics using Azure Monitor REST API

I think it is feasible to read the document, but it has not been tested. You can choose between the two methods according to your needs.

The second way.

You can check CPU Utilization by rest api.

You can refer to offical document(Metrics - List).

enter image description here

And if you want Logical Disk Performance, you can refer the answer in this post.

Is there any API to query an Azure VM for free disk/memory space?

Jason Pan
  • 15,263
  • 1
  • 14
  • 29
  • **I have used Metric List Rest API and got the memory, logical disk for Windows VM. I am facing the issue for linux vm to get the custom metrics like memory, logical disk. So you can please help me either to get the custom metrics for linux vm or how do I get the performance metrics data (Logical Disk Performance, CPU Utilization %) within Insights menu for a Virtual Machine using REST API or Nodejs SDK?** – Param Dec 02 '20 at 12:51
  • [Not able to fetch custom Metrics (for Azure Linux Virtual Machine) using Azure Monitor REST API](https://stackoverflow.com/questions/65088609/not-able-to-fetch-custom-metrics-for-azure-linux-virtual-machine-using-azure-m?noredirect=1#comment115073540_65088609) – Param Dec 02 '20 at 12:52
  • To get free disk/memory space data, please check below: – Param Jan 07 '21 at 11:13
  • Initially you need to enable the diagnostics settings and sync with monitor, then virtual machine guest namespace will appear into the monitor section. Second Step:- in the metric list rest api use: **{metricnamespace: 'Azure.VM.Windows.GuestMetrics', metricnames: 'LogicalDisk\\% Free Space,Memory\\% Committed Bytes In Use'}** – Param Jan 07 '21 at 11:19