docs
api
Cloud Monitor(UMon)
GetMetric

Fetch Monitoring Data - GetMetric

Overview

Fetch Monitoring Data

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetMetric.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ZonestringAvailability Zone. See Availability Zone ListYes
ProjectIdstringProject ID, if not filled in, the default project will be used. Sub-accounts must fill in the Project ID.No
ResourceTypestringResource TypeYes
MetricName.NstringMetric Name (Different ResourceType corresponds to different MetricName)Yes
ResourceIdstringResource Id (Currently, except for sharebandwidth which can be omitted, other resources must be entered. If sharebandwidth is not entered, the first obtained Resource Id will be used by default)No
TimeRangeintRetrieve the monitoring data of the most recent seconds, default is 1 hour, i.e., 3600; the maximum is 1 month.No
BeginTimeintStart time unixtimestamp, this item is ignored if TimeRange is passed in.No
EndTimeintEnd time unixtimestamp, if TimeRange is input, this item will be ignored; if only BeginTime is input, this item defaults to the current time.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
DataSetsDataSetDataNo

Data Model

DataSet

Field NameTypeDescription InformationRequired
TimestampintTimestampYes
ValueintValueYes
IPstringData Source IP AddressNo

Example

Request Example

https://api.surfercloud.com/?Action=GetMetric
&Region=CUPCMnhu
&Zone=xmiktFHL
&ProjectId=AeeicJWM
&ResourceType=iAqCBPNi
&MetricName.n=afvAGmoZ
&ResourceId=eNRBsUET
&TimeRange=NaN
&BeginTime=1
&EndTime=1

Response Example

{
  "Action": "GetMetricResponse",
  "DataSet": {},
  "Message": "tslFtPXU",
  "RetCode": 0
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved