All Products
Search
Document Center

CloudMonitor:DescribeSiteMonitorStatistics

Last Updated:Jul 26, 2024

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

Operation description

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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cms:DescribeSiteMonitorStatisticsget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TaskIdstringYes

The ID of the site monitoring task.

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

ef4cdc8b-9dc7-43e7-810e-f950e56c****
TimeRangestringNo

The statistical period.

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

1440
StartTimestringNo

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.

1576142850527
MetricNamestringYes

The name of the metric. Valid values:

  • Availability
  • ErrorRate
  • ResponseTime
Availability

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

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code.

Note The status code 200 indicates that the call is successful.
200
Messagestring

The returned message.

Succcessful
Datastring

The statistics of the specified metric.

100
RequestIdstring

The ID of the request.

3AD2724D-E317-4BFB-B422-D6691D071BE1
Successstring

Indicates whether the call is successful. Valid values:

  • true: The call is successful.
  • false: The call fails.
true

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
206%s%s-
400InvalidParameterValueThe specified parameter is not valid.-
400InvalidParameterValue%s-
401AccessDeniedExceptionYou donot have sufficient access to perform this action.-
403ForbiddenYou are not authorized to operate the specified resource.No permission, please use RAM to authorize
403InvalidClientTokenIdThe X.509 certificate or cms access key ID provided does not exist in our records.-
429Throttli∂ngExceptionThe request was denied due to request throttling.-
500InternalErrorThe request processing has failed due to some unknown error.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history