阿里云日志服务:实用nginx日志查询-阿里云开发者社区

开发者社区> 开发与运维> 正文

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

简介: 查看非内网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_t...

查看非内网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

版权声明:本文首发在云栖社区,遵循云栖社区版权声明:本文内容由互联网用户自发贡献,版权归用户作者所有,云栖社区不为本文内容承担相关法律责任。云栖社区已升级为阿里云开发者社区。如果您发现本文中有涉嫌抄袭的内容,欢迎发送邮件至:developer2020@service.aliyun.com 进行举报,并提供相关证据,一经查实,阿里云开发者社区将协助删除涉嫌侵权内容。

分享:
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

其他文章