1.Nginx添加监控模块
http_stub_status_module
2.在nginx添加配置项
server {
listen 80;
server_name localhost;
location ^/
{
rewrite / /status permanent;
}
location /nginx_status {
stub_status on;
allow 127.0.0.1;
access_log off;
deny all;
}
}
3.访问
通过访问nginx_status即可查看当前访问流量
Active connections: 2 server accepts handled requests 22043 22043 22134 Reading: 0 Writing: 1 Waiting: 1
4.zabbix监控模板
未完待续