aom__CountEvents
Counts events and alerts in segmented intervals for a specified project and time range, with optional metadata filters, query type, and sorting.
Instructions
[AOM] 该接口用于分段统计指定条件下的事件、告警。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"step": "<step>",
"time_range": "<time_range>"
},
"name": "aom__CountEvents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | 返回列表的排序方式,可以为空。 | |
| step | Yes | 统计步长。毫秒数,例如一分钟则填写为60000。 | |
| type | No | 查询类型。type=active_alert代表查询活动告警,type=history_alert代表查询历史告警。不传或者传其他值则返回指定查询条件的所有信息。 | |
| search | No | 模糊查询匹配字段,可以为空。如果值不为空,可以模糊匹配metadata字段中的必选字段的值。 | |
| project_id | Yes | 租户从IAM申请到的projectid,一般为32位字符串。 | |
| time_range | Yes | timeRange用于指标查询时间范围,主要用于解决客户端时间和服务端时间不一致情况下,查询最近N分钟的数据。另可用于精确查询某一段时间的数据。 | |
| metadata_relation | No | 查询条件组合,可以为空。 |