no (LWP::UserAgent not found)
Cacti监控Nginx时候,需要安装 cacti-nginx 插件
测试获取数据时出错
nginx.conf 配置
[selboo@74-82-173-217 ~]$ /wwwroot/selboo/cacti/scripts/get_nginx_clients_status.pl http://selboo.com.cn/nginx
no (LWP::UserAgent not found)
解决方法:
[root@74-82-173-217 ~]# perl -MCPAN -e shell
cpan> install LWP::UserAgent
[selboo@74-82-173-217 ~]$ /wwwroot/selboo/cacti/scripts/get_nginx_clients_status.pl http://127.0.0.1/nginx
nginx_active:1 nginx_reading:0 nginx_writing:1 nginx_waiting:0
[selboo@74-82-173-217 ~]$
测试获取数据时出错
nginx.conf 配置
location /nginx {
stub_status on;
}
stub_status on;
}
[selboo@74-82-173-217 ~]$ /wwwroot/selboo/cacti/scripts/get_nginx_clients_status.pl http://selboo.com.cn/nginx
no (LWP::UserAgent not found)
解决方法:
[root@74-82-173-217 ~]# perl -MCPAN -e shell
cpan> install LWP::UserAgent
[selboo@74-82-173-217 ~]$ /wwwroot/selboo/cacti/scripts/get_nginx_clients_status.pl http://127.0.0.1/nginx
nginx_active:1 nginx_reading:0 nginx_writing:1 nginx_waiting:0
[selboo@74-82-173-217 ~]$