阿里云日志Nginx日志分析

每分钟接口访问次数的前200条统计

not request_uri : "/heartbeat.html" | SELECT time_series(time, '1m', '%H:%i:%s' ,'0') as time,request_uri,COUNT(*) as number GROUP BY request_uri,time order by number desc LIMIT 200

请求时长统计表

not request_uri : "/heartbeat.html" | SELECT time_series(time, '1m', '%H:%i:%s' ,'0') as time,request_uri,request_time GROUP BY request_uri,time,request_time order by request_time desc LIMIT 200

http status 每分钟状态统计

not request_uri : "/heartbeat.html" | SELECT time_series(time, '1m', '%H:%i:%s' ,'0') as time,status,COUNT(*) as number GROUP BY status,time order by number desc LIMIT 200

http status 499 每分钟状态统计

not request_uri : "/heartbeat.html" and status : 499 | SELECT time_series(time, '1m', '%H:%i:%s' ,'0') as time,status,COUNT(*) as number GROUP BY status,time order by number desc LIMIT 200

499接口报警

* not request_uri : "/heartbeat.html" and status : 499 | SELECT time_series(__time__, '1m', '%H:%i:%s' ,'0') as time,status,COUNT(*) as number GROUP BY status,time order by number desc LIMIT 200

按响应时间排序

select "request_time" , "request_uri" from (select * fromloglimit 1000) orderby "request_time" desc 

按请求次数排序

select count(*) as pv , "request_uri" fromlog WHERE time < 1550888473 andtime > 1550888403 groupby "request_uri" ORDERBY pv DESC
posted @ 2023-03-16 10:25  快乐的提千万  阅读(69)  评论(0编辑  收藏  举报