Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

Virtual machine metric values using timegrain

$
0
0

Hi,

I refered the below link URL to get the path of virtual machines metrics to collect the data
https://convective.wordpress.com/2014/06/22/using-azure-monitoring-service-with-azure-virtual-machines/

I refered the below URL link for sample java code
http://gauravmantri.com/2013/08/25/consuming-windows-azure-service-management-api-in-java/

I used the below string url in my java code to collect the metric values of virtual machines for every five minitues.
But it does not give output.
How to reterive the last five minitues of data?
How to use timegrain in below query? Am i used it correct way?

Input
=====
Syntax
------
https://management.core.windows.net/<subscription_ID>/services/monitoring/metricvalues/query?&resourceId=/hostedservices/<SERVICE_NAME>/deployments/<DEPLOYMENT_NAME>/roles/<VM_NAME>&namespace=&names=Percentage CPU&timeGrain=PT5M&startTime=2014-12-22T14:30:00Z&endTime=2014-12-22T14:35:00Z

(Example)

https://management.core.windows.net/<subscription_ID>/services/monitoring/metricvalues/query?&resourceId=/hostedservices/egazuresqldb/deployments/egazuresqldb/roles/egazuresqldb&namespace=&names=Percentage CPU&timeGrain=PT5M&startTime=2014-12-22T14:30:00Z&endTime=2014-12-22T14:35:00Z


output
======

<MetricValueSetCollection xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Value><MetricValueSet><Name>Percentage CPU</Name><Namespace></Namespace><DisplayName>CPU Percentage</DisplayName><Unit>Percentage</Unit><PrimaryAggregation>Average</PrimaryAggregation><TimeGrain>PT5M</TimeGrain><StartTime>2014-12-22T14:30:00Z</StartTime><EndTime>2014-12-22T14:35:00Z</EndTime><MetricValues/></MetricValueSet></Value></MetricValueSetCollection>



Please help me to resolve this.

Thanks & Regards

Rathidevi



Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>