Domain name for API request: monitor.intl.tencentcloudapi.com.
This API is used to query alarm groups under a given prometheus.
A maximum of 20 requests can be initiated per second for this API.
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: DescribePrometheusAlertGroups. |
| Version | Yes | String | Common Params. The value used for this API: 2018-07-24. |
| Region | Yes | String | Common Params. 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-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo. |
| InstanceId | No | String | prometheus instance ID |
| Limit | No | Integer | Number of returned results. defaults to 20. maximum value is 100. |
| Offset | No | Integer | Offset. default value: 0. |
| GroupId | No | String | Alert group ID, such as alert-xxxx. List the alert group with the given ID. |
| GroupName | No | String | Specifies the alert group name. List alert groups which name contains the given string. |
| Parameter Name | Type | Description |
|---|---|---|
| AlertGroupSet | Array of PrometheusAlertGroupSet | Alert group information. Note: This field may return null, indicating that no valid values can be obtained. |
| TotalCount | Integer | Total count of Alert groups. Note: This field may return null, indicating that no valid values can be obtained. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to list ALL alert groups under an instance, including enabled and disabled ones.
POST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribePrometheusAlertGroups
<Common request parameters>
{
"InstanceId": "prom-xxxxxxxx"
}{
"Response": {
"AlertGroupSet": [
{
"AMPReceivers": [],
"CreatedAt": "2023-08-01T20:29:56+08:00",
"CustomReceiver": {
"Type": "",
"Url": ""
},
"GroupId": "alert-xxxxxxxx",
"GroupName": "Query Alerts Group Trial-1"
"Rules": [
{
"Annotations": [
{
"Key": "summary",
"Value": "{{$value}}"
}
],
"Duration": "",
"Expr": "expr1",
"Labels": [
{
"Key": "_interval_",
"Value": "10m"
}
],
"RuleName": "Rule -1",
"State": 2
}
],
"TemplateId": "",
"UpdatedAt": "2023-08-01T20:29:56+08:00"
}
],
"RequestId": "bc70036f-db50-4b46-abbc-bd41eeb06f7a",
"TotalCount": 1
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure | Error with CAM signature/authentication. |
| FailedOperation | Operation failed. |
| FailedOperation.BadYamlFormat | The YAML format is incorrect. |
| FailedOperation.DbQueryFailed | Failed to query the database. |
| FailedOperation.DbRecordCreateFailed | Failed to create the database record. |
| FailedOperation.DbRecordDeleteFailed | Failed to delete the database record. |
| FailedOperation.DbRecordUpdateFailed | Failed to update the database record. |
| FailedOperation.GenerateInstanceIDFailed | An error occurred while generating the resource ID. |
| FailedOperation.ResourceExist | The resource already exists. |
| FailedOperation.ResourceNotFound | The resource does not exist. |
| InternalError | Internal error. |
| InvalidParameter | Invalid parameter. |
文档反馈