nginx 编译时允许 http_stub_status_module

# vi /usr/local/nginx/conf/nginx.conf
location /nginx_status {
stub_status on;
access_ log off;
allow 192.168.1.100;
deny all;
}

# kill -HUP `cat /usr/local/nginx/logs/nginx.pid`

# wget [url]http://forums.cacti.net/download.[/url] php?id=12676
# tar xvfz cacti-nginx.tar.gz
# cp cacti-nginx/get_nginx_socket_status.pl /data/cacti/scripts/
# cp cacti-nginx/get_nginx_clients_status.pl /data/cacti/scripts/
# chmod 755 /data/cacti/scripts/get_nginx*

检测插件
# /data/cacti/scripts/get_nginx_clients_status.pl [url]http://192.168.1.100/nginx_status[/url]

在cacti管理面板导入
cacti_graph_template_nginx_clients_stat.xml
cacti_graph_template_nginx_sockets_stat.xml