You need to enable JavaScript to run this app.
导航

MiniProAlarmMetricsTrend

最近更新时间2024.04.17 17:39:51

首次发布时间2024.04.03 17:37:05

调用MiniProAlarmMetricsTrend查看报警报警任务相关的指标情况概览。

请求说明

  • 请求方式:POST
  • 请求地址:?Action=MiniProAlarmMetricsTrend&Version=2024-03-12

请求参数

ServiceName : apmplus_openapi 
Region : cn-beijing 
X-App-Ids : xxx 
Content-Type : application/json

Query

参数

类型

是否必选

示例值

描述

Action

String

MiniProAlarmMetricsTrend

接口名称。当前 API 的名称为 MiniProAlarmMetricsTrend

Version

String

2024-03-12

接口版本。当前 API 的版本为 2024-03-12

Body

参数

类型

是否必选

示例值

描述

common

Object of Common

-

通用参数。

time_filter

Object of Time_filter

-

时间区间。

id

Long

302

报警任务ID。

Common

参数

类型

是否必选

示例值

描述

aid

Long

12345

应用ID。

os

String

minipro

服务类型。取值支持appwebprominipro

Time_filter

参数

类型

是否必选

示例值

描述

start_time

Integer

1665849600

起始时间。

granularity

Integer

60

聚合时间粒度。

end_time

Integer

1666011403

终止时间。

返回参数

参数

类型

示例值

描述

data

Object of Data

-

返回内容。

error_msg

String

-

错误信息。

error_no

Integer

0

错误码。0为成功。

Data

参数

类型

示例值

描述

metric_trends

JSON Map

-

报警任务相关的指标趋势。

参数

类型

示例值

描述

fields

Array of Fields

-

指标。

source

Array of String

[ "2022-10-11 08:00:00", "0" ]

与field对应的值。

Fields

参数

类型

示例值

描述

id

String

date

报警时间,为source[i][0]值的含义。

dataType

String

string

数据类型。

name

String

date

指标类型。

示例

请求示例

POST ?Action=MiniProAlarmMetricsTrend&Version=2024-03-12
{
    "common": {
        "aid": 312541,
        "os": "minipro"
    },
    "id": 302,
    "time_filter": {
        "start_time": 1665849600,
        "end_time": 1666011403,
        "granularity": 3600
    }
}

返回示例

{
    "err_detail":"",
    "data":{
        "alarm_trend":{
            "fields":[
                {
                    "id":"date",
                    "dataType":"string",
                    "name":"date"
                },
                {
                    "id":"慢页面次数阈值报警数",
                    "dataType":"number",
                    "name":"慢页面次数阈值报警数"
                }
            ],
            "source":[
                [
                    "2022-10-12 00:00:00",
                    "0",
                    "10818"
                ],
                [
                    "2022-10-13 00:00:00",
                    "156",
                    "9232"
                ]
            ]
        }
    },
    "error_msg":"",
    "error_no":0
}