def METHOD_NAME(metric, app_id, contain_id, start_at=None, end_at=None, limit=None, order_by="desc"):
    """通过容器ID获取监控信息"""
    now = int(time.time() * 1000)
    if not start_at:
        start_at = now - 12 * 3600 * 1000  # 时间单位是毫秒
    if not end_at:
        end_at = now
    field = ", ".join(DockerMetricFields[metric])
    _metric = "{app_id}_docker_{metric}".format(app_id=app_id, metric=metric)
    sql = "SELECT {field} FROM {metric} WHERE time > {start_at} AND time < {end_at}"
    sql = sql.format(field=field, metric=_metric, start_at=start_at, end_at=end_at)
    if isinstance(contain_id, list):
        sql += " AND ( "
        sql += " OR ".join('id = "{container_id}"'.format(container_id=i) for i in contain_id)
        sql += " ) GROUP BY id"
    else:
        sql += ' AND id = "{contain_id}"'.format(contain_id=contain_id)
    # 网络暂时只能显示eth0
    if metric == "net":
        sql += ' AND device_name = "eth0"'
    if order_by:
        sql += " order by time {order_by}".format(order_by=order_by)
    if not limit:
        limit = int((end_at - start_at) / 1000 / 60)
        # if isinstance(contain_id, list):
        #    limit *= len(contain_id)
    sql += " LIMIT {limit}".format(limit=limit)
    data = {"sql": sql, "app_code": APP_CODE, "bk_app_secret": APP_SECRET, "prefer_storage": ""}
    result = http_post_common(API_URL, json=data, timeout=60)
    # if not result.get('result'):
    #    raise error_codes.ComponentError.f(result.get('message', ''))
    data = result["data"] or {"list": []}
    return data