1. 在Nginx 配置文件中增加 Server Status 支持,然后重新启动Nginx
server {
listen 80;
server_name 192.168.1.24;
location ^~ /NginxStatus {
stub_status on;
allow 192.168.1.241
access_log off;
}
}
注:被监测的Nginx服务器最好设置权限访问
2. 下载 cacti 的 nginx模板
http://code.google.com/p/mysql-cacti-templates/
其实里面除了Nginx的模板以外,还包括Memcached,Redis,Mysql,Apache等模板,相对于日常工作已经足够了.
3.将下载下来的压缩文件中的ss_get_by_ssh.php拷贝到cacti的scripts目录中
4.配置cacti中的apache模板
5.参考资料
http://code.google.com/p/mysql-cacti-templates/wiki/NginxTemplates