IT技术博客大学习 共学习 共进步

Cacti 添加 Nginx 监控

SpawN 2010-05-26 13:22:17 浏览 10,363 次

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

建议继续学习

  1. 配置Nginx+uwsgi更方便地部署python应用 (阅读 106,824)
  2. 搜狐闪电邮箱的 Nginx/Postfix 使用模式 (阅读 33,762)
  3. Mysql监控指南 (阅读 21,102)
  4. 解析nginx负载均衡 (阅读 16,423)
  5. 批量添加主机到cacti+nagios的监控报警系统中 (阅读 14,683)
  6. 我常用的主机监控shell脚本 (阅读 13,104)
  7. 7 天打造前端性能监控系统 (阅读 11,063)
  8. Nginx模块开发入门 (阅读 11,041)
  9. 检查nginx配置,重载配置以及重启的方法 (阅读 10,683)
  10. 如何监控HP服务器硬件状态 (阅读 10,505)