tencent cloud

文档反馈

DescribeBasicAlarmList

最后更新时间:2023-08-11 16:09:12

1. API Description

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

This API is used to get the basic alarm list.

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

We recommend you to 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 Params. The value used for this API: DescribeBasicAlarmList.
Version Yes String Common Params. The value used for this API: 2018-07-24.
Region No String Common Params. This parameter is not required for this API.
Module Yes String API component name. The value for the current API is monitor.
StartTime No Integer Start time, which is the timestamp one day prior by default.
EndTime No Integer End time, which is the current timestamp by default.
Limit No Integer Number of parameters that can be returned on each page. Value range: 1 - 100. Default value: 20.
Offset No Integer Parameter offset on each page. The value starts from 0 and the default value is 0.
OccurTimeOrder No String Sorting by occurrence time. Valid values: asc and desc.
ProjectIds.N No Array of Integer Filter by project ID.
ViewNames.N No Array of String Filter by policy type.
AlarmStatus.N No Array of Integer Filter by alarm status.
ObjLike No String Filter by alarm object.
InstanceGroupIds.N No Array of Integer Filter by instance group ID.
MetricNames.N No Array of String Filtering by metric names

3. Output Parameters

Parameter Name Type Description
Alarms Array of DescribeBasicAlarmListAlarms Alarm list.
Note: This field may return null, indicating that no valid value was found.
Total Integer Total number.
Note: This field may return null, indicating that no valid value was found.
Warning String Remarks
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Getting the list of basic alarms

Input Example

POST / HTTP/1.1
Host: monitor.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeBasicAlarmList
<Common request parameters>

{
    "AlarmStatus": [
        "1"
    ],
    "MetricNames": [
        "mem_used"
    ],
    "Module": "monitor",
    "ViewNames": [
        "cvm_device"
    ],
    "Limit": "20",
    "StartTime": "1573660800",
    "Offset": "0",
    "ProjectIds": [
        "0"
    ],
    "EndTime": "1573919999",
    "OccurTimeOrder": "DESC"
}

Output Example

{
    "Response": {
        "Alarms": [
            {
                "AlarmStatus": "OK",
                "AlarmType": "Memory usage",
                "Content": "Memory usage >  66666 MB",
                "Dimensions": "{\"unInstanceId\":\"ins-19a06nn8\"}",
                "Duration": 600,
                "FirstOccurTime": "2019-11-16T15:50:00+08:00",
                "GroupId": 1278966,
                "GroupName": "dddd",
                "Id": 30057956,
                "InstanceGroup": [
                    {
                        "InstanceGroupId": 562,
                        "InstanceGroupName": "barad_nws_cvm"
                    }
                ],
                "LastOccurTime": "2019-11-16T16:00:00+08:00",
                "MetricId": 24,
                "MetricName": "mem_used",
                "NotifyWay": [
                    "EMAIL",
                    "SMS"
                ],
                "ObjId": "a961c198-e0e2-4989-a3b6-7b155b35ff6f",
                "ObjName": "10.0.0.14(251008737 vm1)",
                "ProjectId": 0,
                "ProjectName": "Default project",
                "Region": "gz",
                "Status": 1,
                "ViewName": "cvm_device",
                "Vpc": "1"
            },
            {
                "AlarmStatus": "OK",
                "AlarmType": "Memory usage",
                "Content": "Memory usage >=  200000 MB",
                "Dimensions": "{\"unInstanceId\":\"ins-19a06nn8\"}",
                "Duration": 180,
                "FirstOccurTime": "2019-11-16T15:45:00+08:00",
                "GroupId": 1279043,
                "GroupName": "-",
                "Id": 30057955,
                "InstanceGroup": [
                    {
                        "InstanceGroupId": 562,
                        "InstanceGroupName": "barad_nws_cvm"
                    }
                ],
                "LastOccurTime": "2019-11-16T15:48:00+08:00",
                "MetricId": 24,
                "MetricName": "mem_used",
                "NotifyWay": [
                    "EMAIL",
                    "SMS",
                    "WECHAT"
                ],
                "ObjId": "a961c198-e0e2-4989-a3b6-7b155b35ff6f",
                "ObjName": "10.0.0.14(251008737 vm1)",
                "ProjectId": 0,
                "ProjectName": "Default project",
                "Region": "gz",
                "Status": 1,
                "ViewName": "cvm_device",
                "Vpc": "1"
            }
        ],
        "RequestId": "6b64cc24-0c60-483f-bdc3-2e55edbbc68c",
        "Total": 2,
        "Warning": "This method is deprecated! Use `DescribeAlarmHistories` instead!"
    }
}

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
FailedOperation Operation failed.
FailedOperation.DoHTTPTransferFailed Backend service timed out.
InternalError Internal error.
InvalidParameter Invalid parameter.
InvalidParameterValue The parameter value is incorrect.
LimitExceeded Quota limit is reached.
MissingParameter Missing parameter.
UnsupportedOperation Unsupported operation.
联系我们

联系我们,为您的业务提供专属服务。

技术支持

如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

7x24 电话支持