Log Analytics

  1. 通过Logging的Log Analytics获取在1小时消耗流量TOP 10 URL
    SELECT
    Http_Request.request_url,
    SUM(Http_Request.response_size) AS response_size
    FROM
    `logs__Default_US._Default`
    WHERE
    timestamp > TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 HOUR)
    AND resource.type="http_load_balancer"
    GROUP BY
    Http_Request.request_url
    ORDER BY
    response_size DESC
    LIMIT
    10
  2. 通过Logging的Log Analytics获取在1小时请求次数TOP 10 URL
    SELECT
    Http_Request.request_url, COUNT(*) AS count
    FROM
    `logs__Default_US._Default`
    WHERE
    timestamp > TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 HOUR) AND
    resource.type="http_load_balancer"
    group by Http_Request.request_url
    ORDER BY count DESC
    LIMIT 10

版权声明:
作者:WangGaoli
链接:https://wanggaoli.com/3586.html
来源:王高利的个人博客
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>
文章目录
关闭
目 录