query struct to promql
post/query/ts/struct_to_promql
Headers
traceparentstring
TraceID
Bk-Query-Sourcestring
来源
X-Bk-Scope-Space-Uidstring
空间UID
Request body
Example request
{
"down_sample_range": "5m",
"end_time": "1657851600",
"metric_merge": "a",
"query_list": [
{
"conditions": {
"condition_list": [
"and"
],
"field_list": [
{
"field_name": "bk_biz_id",
"op": "contains",
"value": [
"2"
]
}
]
},
"dimensions": [
"bk_target_ip",
"bk_target_cloud_id"
],
"field_name": "usage",
"function": [
{
"dimensions": [
"bk_target_ip",
"bk_target_cloud_id"
],
"field": "field",
"method": "mean",
"window": "60s"
}
],
"reference_name": "a",
"table_id": "system.cpu_summary",
"table_id_conditions": [
[
{
"field_name": "bk_biz_id",
"op": "contains",
"value": [
"2"
]
}
]
],
"time_aggregation": {
"function": "avg_over_time",
"window": "60s"
}
}
],
"start_time": "1657848000",
"step": "1m",
"timezone": "Asia/Shanghai"
}Response
OK
Example response
{
"down_sample_range": "5m",
"timezone": "Asia/Shanghai"
}