Reputation: 63
Can we collect metrics for Azure Classic VM using Storage API or is there any other way to get the metrics for Azure Classic VM please suggest.
Upvotes: 2
Views: 361
Reputation: 8491
To get the Azure VM metrics from a Azure Storage Service, you need to enable Diagnostics and configure the Storage Account on Azure portal.
After that, you will find that multi tables will be created to store the metrics.
The tables are with the following naming conventions:
Each WADMetrics table will contain the following columns:
To read the data from Azure Table, you could use Azure Table client library or Azure Table REST API.
Get started with Azure Table storage using .NET
Update 2017/07/18
my doubt is 20170709 is start date and 20170719 is end date am i right?
Yes, you are right.
Doubt 2.To access this table i need to create a POJO so how can i get the schema of the table meaning if maximum/minimum/Average is int/long/double/float
You can open a entity of the table from Azure Storage Explorer. You will see the type of the columns. For example,
Doubt 3. how to query WADMetricsPT1HP10DV2S20170709 to get metrics for one particular hour?
You could query the data by Timestamp.
Upvotes: 2
Reputation: 136126
Can we collect metrics for Azure Classic VM using Storage API
By collect metrics
, if you mean the process of capturing the metrics data then the answer is no. You can't use Storage API to do that. You would need to use the Metrics API for that purpose. Data collected by this API will store the data in Azure Storage.
Once the data is in Azure Storage, then you can use Storage API to get that data. Depending on where the data is stored (Blobs and/or Tables), you would use appropriate parts of Storage API to fetch and manage that data.
Upvotes: 0