租户函数统计信息
功能介绍
租户函数统计信息。
返回三类的统计信息,函数格式和大小使用情况包括配额和使用量,流量报告。 通过查询参数filter可以进行过滤,查询参数period可以指定返回的时间段。
URI
GET /v2/{project_id}/fgs/functions/statistics
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
租户项目 ID,获取方式请参见获取项目ID。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
filter |
是 |
String |
参数过滤器。 monitor_data: 查询统计信息。 monthly_report:查询月度统计信息。 枚举值:
|
period |
否 |
String |
时间段单位为分钟,与filter参数metric配合使用。 |
option |
否 |
String |
月度统计的维度,filter参数取值为monthly_report时才生效。 当取值不在以上范围时,默认取"0"。
|
limit |
否 |
String |
本次查询最大返回的数据条数,最大值500,默认值100 缺省值:100 最小长度:1 最大长度:64 |
marker |
否 |
String |
本次查询起始位置,默认值0 缺省值:0 最小长度:1 最大长度:64 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
Content-Type |
是 |
String |
消息体的类型(格式) |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
count |
Array of MonthUsed objects |
月度调用次数 |
gbs |
Array of MonthUsed objects |
月度资源用量 |
gpu_gbs |
Array of MonthUsed objects |
月度gpu资源用量 |
statistics |
函数指标 |
参数 |
参数类型 |
描述 |
---|---|---|
count |
Array of SlaReportsValue objects |
调用次数 |
duration |
Array of SlaReportsValue objects |
平均时延,单位毫秒 |
fail_count |
Array of SlaReportsValue objects |
错误次数 |
max_duration |
Array of SlaReportsValue objects |
最大时延,单位毫秒 |
min_duration |
Array of SlaReportsValue objects |
最小时延,单位毫秒 |
reject_count |
Array of SlaReportsValue objects |
被拒绝次数 |
function_error_count |
Array of SlaReportsValue objects |
函数错误次数 |
system_error_count |
Array of SlaReportsValue objects |
系统错误次数 |
reserved_instance_num |
Array of SlaReportsValue objects |
预留实例指标 |
concurrency_num |
Array of SlaReportsValue objects |
弹性实例指标 |
参数 |
参数类型 |
描述 |
---|---|---|
timestamp |
Integer |
时间戳 |
value |
Double |
值,value值为-1表示当前时间段该指标无数据,例如函数未执行等情况。 |
状态码: 400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码 |
error_msg |
String |
错误信息 |
请求示例
租户函数统计信息。
GET /v2/{project_id}/fgs/functions/statistics
响应示例
状态码: 200
查询成功
{ "statistics" : { "count" : [ { "timestamp" : 1596679200000, "value" : -1 }, { "timestamp" : 1596682800000, "value" : 2 }, { "timestamp" : 1596686400000, "value" : -1 } ], "duration" : [ { "timestamp" : 1596679200000, "value" : -1 }, { "timestamp" : 1596682800000, "value" : 950 }, { "timestamp" : 1596686400000, "value" : -1 } ], "fail_count" : [ { "timestamp" : 1596679200000, "value" : -1 }, { "timestamp" : 1596682800000, "value" : 0 }, { "timestamp" : 1596686400000, "value" : -1 } ], "max_duration" : [ { "timestamp" : 1596679200000, "value" : -1 }, { "timestamp" : 1596682800000, "value" : 740 }, { "timestamp" : 1596686400000, "value" : -1 } ], "min_duration" : [ { "timestamp" : 1596679200000, "value" : -1 }, { "timestamp" : 1596682800000, "value" : 210 }, { "timestamp" : 1596686400000, "value" : -1 } ], "reject_count" : [ { "timestamp" : 1596679200000, "value" : -1 }, { "timestamp" : 1596682800000, "value" : 0 }, { "timestamp" : 1596686400000, "value" : -1 } ] } }
状态码
状态码 |
描述 |
---|---|
200 |
查询成功 |
400 |
Bad Request |
错误码
请参见错误码。