Cacti 添加 Nginx 监控

SpawN 2010-05-26 13:22:17 累计浏览 11,298 次

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 Gateway Fabric 2.8: IP allow and deny lists, passive health checks, and cookie-based session persistence (2026-11-14 01:10:02)
  2. NGINX Ingress Controller 5.7: HTTP/2 to your upstreams, Opaque Secrets, and cert-manager challenges behind HTTPS redirects (2026-11-14 00:10:02)
  3. Hexo 文章一键发布到微信公众号 (2026-11-13 19:10:02)

查看更多 DevOps 文章 →

建议继续学习

  1. 配置Nginx+uwsgi更方便地部署python应用 (累计阅读 109,257)
  2. 搜狐闪电邮箱的 Nginx/Postfix 使用模式 (累计阅读 34,259)
  3. 记录一个软中断问题 (累计阅读 17,393)
  4. 解析nginx负载均衡 (累计阅读 17,001)
  5. 批量添加主机到cacti+nagios的监控报警系统中 (累计阅读 15,539)
  6. 我常用的主机监控shell脚本 (累计阅读 14,008)
  7. Nginx模块开发入门 (累计阅读 11,531)
  8. server日志的路径分析 (累计阅读 11,501)
  9. 检查nginx配置,重载配置以及重启的方法 (累计阅读 11,292)
  10. fsockopen 异步处理 (累计阅读 10,807)