阿里云日志服务:实用nginx日志查询

zeusro 2019-09-02

nginx OSS 日志 日志服务 BY IP PUT Group

查看非内网IP

| SELECT client_ip as ip  WHERE  ip_to_domain(client_ip) != 'intranet' GROUP  BY  ip

| SELECT client_ip as ip,COUNT(*) as count  WHERE  ip_to_domain(client_ip) != 'intranet' GROUP  BY  ip ORDER  by count desc

分组查看UA

| SELECT user_agent as ua,COUNT(*) as count   GROUP  BY  ua ORDER  by count desc

查看请求方式

* | SELECT http_method, COUNT(*) as number GROUP BY http_method

NOT http_method :'GET'

查看写入oss的客户端IP

* | SELECT client_ip WHERE http_method ='PUT' GROUP BY client_ip

客户端IP热力图

* | select  ip_to_geo(client_ip) as address, count(1) as count group by address order by count desc
登录 后评论
下一篇
corcosa
16980人浏览
2019-10-08
相关推荐
Kubernetes日志采集Sidecar模式介绍
15836人浏览
2018-10-10 21:38:56
日志分析:SLS vs ELK
9492人浏览
2019-01-02 12:04:31
日志系列--计量日志处理方案
2562人浏览
2017-07-11 20:28:55
0
0
0
6940