Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2549999
  • 博文数量: 271
  • 博客积分: 6659
  • 博客等级: 准将
  • 技术积分: 3141
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-17 10:24
文章分类

全部博文(271)

文章存档

2016年(2)

2015年(12)

2014年(7)

2013年(19)

2012年(22)

2011年(81)

2010年(128)

分类: 系统运维

2012-04-23 13:21:15

1.配置nginx.conf  

server
        {
                listen       80;
                server_name localhost;
                index index.php index.html;
                root  html;
                location ~ .*\.(php|php5)?$
                        {
                                fastcgi_pass  127.0.0.1:9000;
                                fastcgi_index index.php;
                                include fastcgi.conf;
                        }       
                location /status {
                                stub_status on;
                                access_log   off;
                                allow  192.168.6.0/24;
                                allow  x.x.x.x;
                                deny all;
                }
                access_log  off;
        }


2.下载cacti for nginx 插件包:

3.解压后一共有5个文件,首先把 get_nginx_socket_status.pl 以及 get_nginx_clients_status.pl 上传至服务器cacti 目录下scripts 并设置可执行权


检测插件(举例)

[root@WTtraffic scripts]# ./get_nginx_clients_status.pl  
nginx_active:2118 nginx_reading:50 nginx_writing:1 nginx_waiting:2067 
 

然后在cacti管理面板导入

导入的方式是 Import Templates  >  Import Template from Local File (浏览导入插件包另外2个文件)

cacti_graph_template_nginx_clients_stat.xml
cacti_graph_template_nginx_sockets_stat.xml
阅读(1392) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~