PutMonitorData

Last updated: 2021-07-06 16:36:25

    1. API Description

    Domain name for API request: monitor.tencentcloudapi.com.

    The default API request rate limit is 50 requests/sec.
    The default upper limit on metrics of a single tenant is 100.
    A maximum of 30 metric/value pairs can be reported at a time. When an error is returned for a request, no metrics/values in the request will be saved.

    The reporting timestamp is the timestamp when you want to save the data. We recommend that you construct a timestamp at integer minutes.
    The time range of a timestamp is from 300 seconds before the current time to the current time.
    The data of the same IP metric/value pair must be reported by minute in chronological order.

    A maximum of 50 requests can be initiated per second for this API.

    Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: monitor.ap-shanghai-fsi.tencentcloudapi.com

    We recommend you use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common parameter. The value used for this API: PutMonitorData.
    Version Yes String Common parameter. The value used for this API: 2018-07-24.
    Region Yes String Common parameter. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-mumbai, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, eu-moscow, na-ashburn, na-siliconvalley, na-toronto
    Metrics.N Yes Array of MetricDatum A group of metrics and data.
    AnnounceIp No String IP address that is automatically specified when monitoring data is reported.
    AnnounceTimestamp No Integer Timestamp that is automatically specified when monitoring data is reported.
    AnnounceInstance No String IP address or product instance ID that is automatically specified when monitoring data is reported.

    3. Output Parameters

    Parameter Name Type Description
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Reporting metric from client

    Input Example

    https://monitor.tencentcloudapi.com/?Action=PutMonitorData
    &Version=2018-07-24
    &AnnounceIp=10.0.0.1
    &AnnounceTimestamp=1569379988
    &Metrics.0.MetricName=name1
    &Metrics.0.Value=value1
    &Metrics.1.MetricName=name2
    &Metrics.1.Value=value2
    &<Common request parameters>
    

    Output Example

    {
    "Response": {
      "RequestId": "7cc6ae87-2aae-4394-8ccb-29777f5aeadx"
    }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    DryRunOperation DryRun Operation. It means that the request would have succeeded, but the DryRun parameter was used.
    FailedOperation Operation failed.
    FailedOperation.ServiceNotEnabled The service is not enabled and can be used only after being enabled.
    InternalError Internal error.
    InternalError.ExeTimeout Execution timed out.
    InvalidParameter Invalid parameter.
    InvalidParameter.InvalidParameter Invalid parameter.
    InvalidParameter.InvalidParameterParam Invalid parameter.
    InvalidParameterValue The parameter value is incorrect.
    LimitExceeded Quota limit is reached.
    LimitExceeded.MetricQuotaExceeded Quota limit on metrics is reached. Requests containing unregistered metrics are prohibited.
    MissingParameter Missing parameter.
    ResourceNotFound The resource is not found.
    ResourceUnavailable The resource is unavailable.
    UnauthorizedOperation Unauthorized operation.
    UnknownParameter Unknown parameter.
    UnsupportedOperation Unsupported operation.