Queries the statistics of a specified metric for a specified site monitoring task.

This topic provides an example to show how to query the statistics of the Availability metric for a site monitoring task whose ID is ef4cdc8b-9dc7-43e7-810e-f950e56c****. The result indicates that the availability rate of the site is 100%.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeSiteMonitorStatistics

The operation that you want to perform. Set the value to DescribeSiteMonitorStatistics.

MetricName String Yes Availability

The name of the metric. Valid values:

  • Availability
  • ErrorRate
  • ResponseTime
TaskId String Yes ef4cdc8b-9dc7-43e7-810e-f950e56c****

The ID of the site monitoring task.

For more information about how to obtain the ID of a site monitoring task, see DescribeSiteMonitorList.

TimeRange String No 1440

The statistical period.

Unit: minutes. Default value: 1440 (1 day). Maximum value: 43200 (30 days).

StartTime String No 1576142850527

The timestamp that specifies the beginning of the time range to query.

Unit: milliseconds. The default value is 1 hour ahead of the current time.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 3AD2724D-E317-4BFB-B422-D6691D071BE1

The ID of the request.

Success String true

Indicates whether the call is successful. Valid values:

  • true: The call is successful.
  • false: The call fails.
Code String 200

The HTTP status code.

Note The status code 200 indicates that the call is successful.
Data String 100

The statistics of the specified metric.

Message String Succcessful

The returned message.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeSiteMonitorStatistics
&MetricName=Availability
&TaskId=ef4cdc8b-9dc7-43e7-810e-f950e56c****
&<Common request parameters>

Sample success responses

XML format

<DescribeSiteMonitorStatisticsResponse>
	  <Message>successful</Message>
	  <RequestId>3AD2724D-E317-4BFB-B422-D6691D071BE1</RequestId>
	  <Data>100</Data>
	  <Code>200</Code>
	  <Success>true</Success>
</DescribeSiteMonitorStatisticsResponse>

JSON format

{
	"Message": "successful",
	"RequestId": "3AD2724D-E317-4BFB-B422-D6691D071BE1",
	"Data": 100,
	"Code": "200",
	"Success": true
}

Error codes

For a list of error codes, visit the API Error Center.