模板下载:

http://forums.cacti.net/about26458.html&highlight=nginx

cp get_nginx_clients_status.pl <path_cacti>/scripts/
cp get_nginx_socket_status.pl <path_cacti>/scripts/
chmod 0755 <path_cacti>/scripts/get_nginx_socket_status.pl
chmod 0755 <path_cacti>/scripts/get_nginx_clients_status.pl

 安装perl模块:

yum install perl-libwww-perl

导入模板
cacti_graph_template_nginx_clients_stat.xml

cacti_graph_template_nginx_sockets_stat.xml

添加主机、图像时url要包含客户机地址,比如http://XX.YY.AA.ZZ/nginx_status/,

而不是/nginx_status/

客户机启用 nginx http_stub_status_module 模块
vi nginx.conf
location /nginx_status {
   stub_status on;
   disable access_log if requared
   access_log   off;
   allow XX.YY.AA.ZZ;
   deny all;
}

XX.YY.AA.ZZ为网管监控服务器ip地址。

原创文章,转载请注明: 转载自素食勤俭敬老孝慈

本文链接地址: cacti监控nginx

文章的脚注信息由WordPress的wp-posturl插件自动生成

Tags: ,

709 views

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <font color="" face="" size=""> <span style="">