欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

tengine监控

发布时间:2024/3/26 60 豆豆
生活随笔 收集整理的这篇文章主要介绍了 tengine监控 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

tengine监控

连接数监控

server {listen 80;server_name localhost;location /status{#开启监控stub_status on;#关闭access日志access_log off;#允许哪台机器访问#allow 127.0.0.1;#拒绝哪台机器访问#deny all;} }

负载均衡监控

server {listen 80;server_name localhost;location /upstream{#用check_status模块监控check_status;#关闭access日志access_log off;} }

并发请求数监控

每秒并发数请求(只能用同天数据)

[root@tengine logs]# awk '{print $4}' access.log | sort -r | uniq -c | head -102 [28/Feb/2022:21:24:295 [28/Feb/2022:15:24:29

访问ip最多

[root@tengine logs]# awk '{print $1}' access.log | uniq -c | sort -nr | head -102 192.168.188.1362 192.168.188.1352 192.168.188.1341 192.168.188.133

状态码统计

[root@tengine logs]# awk '{print $9}' access.log | uniq -c | sort -nr | head -107 404

总结

以上是生活随笔为你收集整理的tengine监控的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。