I have statistics for an example of a function. This crack passes through the details but unfortunately I'm just getting blank data points. any idea? I have also tried to change (I can Gogling field areas) but it did not solve my problem, and I have decided that I can confirm That's right too. / P> Is there anything in the main AWS console that should be able to do it? Am I forgetting something? So far, took a long time to test different things but nothing really did not work
public object getMetricStatisticResults (credentials creds, Amazon.RegionEndpoint area, InstanceID string, integer period, String [] Statistics DATETIME, StartTime DATETIME, endtime) {var client = AWSClientFactory.CreateAmazonCloudWatchClient (creds, area ); Var dimension = new dimension {name = "instant", value = instanceID}; Var Request = New GetMetricStatisticsRequest (); Request.Dimensions.Add (dimension); Var current time = datetime.utc now; Request.starttime = Beginners; // checked and it's all right! -5 day request Endtime = endtime; // check, showing price now! request. Namespace = "AWS / EC2"; // Not sure what this is but has been added according to the request of the example. MetricName = "CPUUtilization"; // I have to get the request. Statistics. Add ("average"); // I want others but minimizing the minimum so that I can test the easy part. request. Prid = 300; Var response = client.GetMetricStatistics (request); If (response.Datapoints.Count & gt; 0) {// never happens} else {// always happens !!! Grrrrr}}
the issue was with the following line of code:
{name = "InstanceID", value = InstanceID};
Should say "InstanceID", note the small 'P' in the end. This solved solution for me:
{name = "instanceID", value = instanceID};
Comments
Post a Comment