最近更新时间:2024.04.25 17:57:50
首次发布时间:2024.04.25 17:57:50
调用GetAppCPUTrend获取CPU各项指标趋势。
ServiceName : apmplus_openapi Region : cn-beijing X-App-Ids : xxx Content-Type : application/json
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 |
| 接口名称。当前 API 的名称为 |
Version | String | 是 |
| 接口版本。当前 API 的版本为 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
start_time | Integer | 否 |
| 起始时间(Unix时间戳)。 |
end_time | Integer | 否 |
| 结束时间(Unix时间戳)。 |
filters | Object of Condition | 否 |
| 筛选条件,可以指定多个键值对来筛选数据。 |
granularity | Integer | 否 |
| 数据粒度。例如 '60' 表示分钟级粒度。 |
biz_type | String | 否 |
| 业务类型。
|
metric | String | 否 |
| CPU指标。 |
scales | Array of String | 否 |
| 统计度量。
|
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
op | String | 否 |
| 操作符。
|
type | String | 否 |
| 筛选条件类型。
|
value | String | 否 |
| 筛选值。 |
values | Array of String | 否 |
| 筛选值,支持多个。 |
map_key | String | 否 |
| map类型key,当type为map时必填。 |
dimension | String | 否 |
| 条件的名称。 |
sub_conditions | Array of Condition | 否 |
| 子条件。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
data | Object of MultiTrendResponseData |
| 返回数据。 |
error_msg | String |
| 错误信息。 |
error_no | Integer |
| 错误码。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
use_rate | JSON Map |
| 用户使用率。 |
sample_cnt | Object of TrendLine |
| 指标趋势。 |
sample_total | Integer |
| 样本总量。 |
use_rate_avg | Double |
| 平均值。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
key | String |
| 指标key。 |
value | Object of TrendLine |
| 样本量。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
name | String |
| 线的名称,在分组的情况下,name应该是分组维度的取值,比如用来显示曲线的图标。 |
points | Array of TrendPoint |
| 曲线上的点。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
alert | Object of AlertPoint |
| 提示信息。 |
value | Double |
| 指标值。 |
timestamp | Long |
| 指标发生时间(Unix时间戳)。 |
readable_timestamp | String |
| 指标发生时间(自然时间)。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
msg | String |
| 提示信息。 |
alert | Boolean |
| 是否需要提示。 |
POST ?Action=GetAppCPUTrend&Version=2024-04-09 { "start_time": 1619827200, "end_time": 1619913600, "filters": { "type": "and", "sub_conditions": [ { "dimension": "apm_version", "type": "expression", "op": "in", "values": [ "1.4.5" ] }, { "dimension": "device_model", "type": "expression", "op": "in", "values": [ "MI 5X" ] } ] }, "granularity": 60, "biz_type": "cpu", "metric": "crash_count", "scales": [ "avg" ] }
{ "data": { "use_rate": { "key": "avg" }, "sample_cnt": { "name": "test123", "points": [ { "alert": "-", "value": 123, "timestamp": 1665417600, "readable_timestamp": "2022-10-11" } ] }, "sample_total": 100, "use_rate_avg": 0.5 }, "error_msg": "", "error_no": 0 }