tencent cloud

腾讯云可观测平台

动态与公告
产品动态
产品简介
产品概述
产品优势
基本功能
基本概念
应用场景
使用限制
购买指南
云产品监控
应用性能监控
终端性能监控
前端性能监控
云拨测
Prometheus 监控服务
Grafana 服务
事件总线
云压测
快速入门
监控概览
实例分组
云产品监控
应用性能监控
云拨测
云压测
Prometheus 监控服务
Grafana 服务
创建 Dashboard
事件总线
告警服务
云产品监控
云产品监控指标
控制台操作指南
云服务器监控组件
云产品监控对接 Grafana
故障处理
实践教程
应用性能监控
应用性能监控简介
接入指南
控制台操作指南
实践教程
参考信息
常见问题
终端性能监控
终端性能监控概述
控制台操作指南
接入指南
实践教程
前端性能监控
前端性能监控简介
控制台操作指南
接入指南
常见问题
云拨测
产品简介
控制台操作指南
常见问题
云压测
云压测概述
控制台操作指南
实践教程
JavaScript API 列表
常见问题
Prometheus 监控
Prometheus 监控简介
接入指南
控制台操作指南
实践教程
Terraform
常见问题
Grafana 服务
产品简介
控制台操作指南
Grafana 平台常用功能指引
常见问题
Dashboard
什么是 Dashboard
控制台操作指南
告警管理
控制台操作指南
故障处理
常见问题
事件总线
事件总线简介
控制台操作指南
实践教程
常见问题
报表管理
常见问题
腾讯云可观测平台常见问题
告警服务相关
一般性问题
监控图表相关
云服务器监控组件相关
动态阈值告警相关
云监控对接 Grafana 相关
文档阅读指南
相关协议
应用性能监控服务等级协议
APM 隐私协议
APM 数据处理和安全协议
前端性能监控服务等级协议
终端性能监控服务等级协议
云拨测服务等级协议
Prometheus 监控服务服务等级协议
Grafana 服务服务等级协议
云压测服务等级协议
云压测使用限制
Cloud Monitor Service Level Agreement
词汇表
文档腾讯云可观测平台

DescribeAlarmHistories

聚焦模式
字号
最后更新时间: 2025-11-13 20:45:50

1. API Description

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

This API is used to query the alarm records.

Note: If you use a sub-account, you can only query the alarm records of authorized projects or uncategorized products.

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: DescribeAlarmHistories.
Version Yes String Common Params. The value used for this API: 2018-07-24.
Region No String Common Params. This parameter is not required.
Module Yes String Value fixed at "monitor"
PageNumber No Integer Page number starting from 1. Default value: 1
PageSize No Integer Number of entries per page. Value range: 1–100. Default value: 20
Order No String Sort by the first occurrence time in descending order by default. Valid values: ASC (ascending), DESC (descending)
StartTime No Integer Start time, which is the timestamp one day ago by default and the time when the alarm FirstOccurTime first occurs. An alarm record can be searched only if its FirstOccurTime is later than the StartTime.
EndTime No Integer End time, which is the current timestamp and the time when the alarm FirstOccurTime first occurs. An alarm record can be searched only if its FirstOccurTime is earlier than the EndTime.
MonitorTypes.N No Array of String Filter by monitor type. Valid values: "MT_QCE" (Tencent Cloud service monitoring), "MT_TAW" (application performance monitoring), "MT_RUM" (frontend performance monitoring), "MT_PROBE" (cloud automated testing). If this parameter is left empty, all types will be queried by default.
AlarmObject No String Filter by alarm object. Fuzzy search with string is supported
AlarmStatus.N No Array of String Filter by alarm status. Valid values: ALARM (not resolved), OK (resolved), NO_CONF (expired), NO_DATA (insufficient data). If this parameter is left empty, all will be queried by default
ProjectIds.N No Array of Integer Filter by project ID. Valid values: -1 (no project), 0 (default project)
InstanceGroupIds.N No Array of Integer Filter by instance group ID
Namespaces.N No Array of MonitorTypeNamespace Filter by policy type. Monitoring type and policy type are first-level and second-level filters respectively and both need to be passed in. For example, [{"MonitorType": "MT_QCE", "Namespace": "cvm_device"}]
MetricNames.N No Array of String Filter by metric name
Reference for values
DescribeAlarmMetrics
PolicyName No String Fuzzy search by policy name
Content No String Fuzzy search by alarm content
ReceiverUids.N No Array of Integer Search by recipient
ReceiverGroups.N No Array of Integer Search by recipient group
PolicyIds.N No Array of String Search by alarm policy ID list

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Total number
Histories Array of AlarmHistory Alarm record list
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying alert records

Monitoring type is a first-level filter, and policy type is a second-level filter. Therefore, the policy type is meaningful only after the monitoring type is specified in the Namespaces field.

To query the alert records of "CVM - Basic Monitoring", the filter should be monitoring type (Tencent Cloud service monitoring), policy type (CVM - Basic Monitor).

Enter ["MT_QCE"] for MonitorTypes as the first-level filter.

Enter [{"MonitorType": "MT_QCE", "Namespace": "cvm_device"}] for Namespaces as the second-level filter.

Input Example

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

{
    "Module": "monitor",
    "PageNumber": 1,
    "PageSize": 10,
    "StartTime": 1598976507,
    "EndTime": 1599019707
}

Output Example

{
    "Response": {
        "TotalCount": 486,
        "Histories": [
            {
                "Dimensions": "xx",
                "LastOccurTime": 1603162964,
                "Namespace": "xx",
                "Content": "xx",
                "PolicyId": "xx",
                "AlarmStatus": "xx",
                "ReceiverGroups": [
                    1544
                ],
                "VPC": "xx",
                "FirstOccurTime": 1603117860,
                "EventId": 0,
                "PolicyName": "xx",
                "ProjectId": 0,
                "Region": "xx",
                "AlarmObject": "xx",
                "AlarmId": "xx",
                "ReceiverUids": [
                    0
                ],
                "OriginId": "xx",
                "NoticeWays": [
                    "SMS",
                    "EMAIL",
                    "WECHAT"
                ],
                "ProjectName": "xx",
                "InstanceGroup": [
                    {
                        "Id": 430,
                        "Name": "xx"
                    }
                ],
                "MetricsInfo": [
                    {
                        "Description": "xx",
                        "QceNamespace": "xx",
                        "Period": 60,
                        "Value": "xx",
                        "MetricName": "xx"
                    }
                ],
                "MonitorType": "xx",
                "PolicyExists": 1,
                "AlarmType": "xx"
            },
            {
                "Dimensions": "xx",
                "LastOccurTime": 1603162964,
                "Namespace": "xx",
                "Content": "xx",
                "PolicyId": "xx",
                "AlarmStatus": "xx",
                "ReceiverGroups": [
                    0
                ],
                "VPC": "xx",
                "FirstOccurTime": 1603117860,
                "EventId": 0,
                "PolicyName": "xx",
                "ProjectId": 0,
                "Region": "xx",
                "AlarmObject": "xx",
                "AlarmId": "xx",
                "ReceiverUids": [
                    0
                ],
                "OriginId": "xx",
                "NoticeWays": [
                    "xx"
                ],
                "ProjectName": "xx",
                "InstanceGroup": [
                    {
                        "Id": 430,
                        "Name": "xx"
                    }
                ],
                "MetricsInfo": [
                    {
                        "Description": "xx",
                        "QceNamespace": "xx",
                        "Period": 0,
                        "Value": "xx",
                        "MetricName": "xx"
                    }
                ],
                "MonitorType": "xx",
                "PolicyExists": 1,
                "AlarmType": "xx"
            }
        ],
        "RequestId": "xx"
    }
}

Example2 Querying the alert records of "CVM - Basic Monitoring"

Monitoring type is a first-level filter, and rule type is a second-level filter. Therefore, the rule type is meaningful only after the monitoring type is specified in the Namespaces field.

To query the alert records of "CVM - Basic Monitoring", the filter should be monitoring type (Tencent Cloud service monitoring), rule type (CVM - Basic Monitor).

Enter ["MT_QCE"] for MonitorTypes as the first-level filter.

Enter [{"MonitorType": "MT_QCE", "Namespace": "cvm_device"}] for Namespaces as the second-level filter.

Input Example

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

{
    "Module": "monitor",
    "PageNumber": 1,
    "PageSize": 10,
    "StartTime": 1598976507,
    "EndTime": 1599019707,
    "MonitorTypes": [
        "MT_QCE"
    ],
    "Namespaces": [
        {
            "MonitorType": "MT_QCE",
            "Namespace": "cvm_device"
        }
    ]
}

Output Example

{
    "Response": {
        "Histories": [
            {
                "AlarmId": "c36494f8-ae38-45cb-8089-e14006bcfc67",
                "MonitorType": "MT_QCE",
                "Namespace": "cvm_device",
                "AlarmObject": "10.104.126.8 (private) | CVM 01 | Classic network",
                "Content": "CPU utilization > 0%",
                "FirstOccurTime": 1603117860,
                "LastOccurTime": 1603162964,
                "AlarmStatus": "ALARM",
                "PolicyId": "policy-abc01",
                "PolicyName": "CVM alerting rule 1",
                "VPC": "0",
                "ProjectId": 0,
                "ProjectName": "The default project",
                "InstanceGroup": [
                    {
                        "Id": 430,
                        "Name": "example-instance-group"
                    }
                ],
                "ReceiverUids": [],
                "ReceiverGroups": [
                    1544
                ],
                "NoticeWays": [
                    "SMS",
                    "EMAIL",
                    "WECHAT"
                ],
                "EventId": 0,
                "AlarmType": "METRIC",
                "OriginId": "1278441",
                "Region": "gz",
                "PolicyExists": 1,
                "MetricsInfo": [
                    {
                        "QceNamespace": "qce/cvm",
                        "MetricName": "CpuUsage",
                        "Period": 60,
                        "Value": "86.5",
                        "Description": "CPU utilization"
                    }
                ]
            },
            {
                "AlarmId": "779d129a-40a1-4acf-b226-d9c2ae26e63b",
                "MonitorType": "MT_QCE",
                "Namespace": "cvm_device",
                "AlarmObject": "10.104.126.9 (private) | CVM 02 | Classic network",
                "Content": "CPU utilization > 0%",
                "FirstOccurTime": 1603117860,
                "LastOccurTime": 1603162964,
                "AlarmStatus": "ALARM",
                "PolicyId": "policy-abc02",
                "PolicyName": "CVM alerting rule 2",
                "VPC": "0",
                "ProjectId": 0,
                "ProjectName": "The default project",
                "InstanceGroup": [
                    {
                        "Id": 430,
                        "Name": "example-instance-group"
                    }
                ],
                "ReceiverUids": [],
                "ReceiverGroups": [],
                "NoticeWays": [],
                "EventId": 0,
                "AlarmType": "METRIC",
                "OriginId": "1276973",
                "Region": "gz",
                "PolicyExists": 1,
                "MetricsInfo": null
            }
        ],
        "RequestId": "4bzogxhgsgs95hgmxne5ei6y9jjxvi1f",
        "TotalCount": 486
    }
}

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.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈