下載插件http://www.oschina.net/uploads/code/cacti-nginx.tar.gz
導入模本...................成功
測試數據:
/home/htdocs/cacti/scripts/get_nginx_clients_status.pl http://www.t.com/nginx_status
提示:
no (LWP::UserAgent not found)
網上查,出現這個問題是perl裏缺乏組件,解決辦法以下 [http://hi.baidu.com/fjcyz/blog/item/02719d2f6526b0331f30892c.html]:
perl -MCPAN -e shell
cpan> install LWP::UserAgent
第一步,perl -MCPAN -e shell提示配置什麼的,先無論輸入no,這個步驟若是須要,能夠輸入cpan>o conf init顯示
第二步,install LWP::UserAgent,可好,卡在ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz文件下載不了,嘗試幾回都失敗
估計不能夠了,嘗試yum也不能夠,google搜索怎麼安裝perl組件,找到下面兩篇文章:
如何安裝PERL組件模塊在windows和unix上
http://topic.csdn.net/t/20031025/12/2393714.html
Perl 的組件的安裝
http://hi.baidu.com/gaogaf/blog/item/c7a8db330cbe784aad4b5f20.html
CPAN 安裝細節
http://hi.baidu.com/thinke365/blog/item/0de61030c0bf9c12eac4af79.html
perl 學習手扎
http://www.newsmth.net/bbsanc.php?path=%2Fgroups%2Fcomp.faq%2FPerl%2Ffor_newbie%2Ftutor%2Fperllearn%2FM.1144026580.C0
搜尋組件(LWP::UserAgent):php
http://search.cpan.org/search?query=LWP%3A%3AUserAgent&mode=module 第一個下載包下載 wget http://cpan.wenzk.com/authors/id/G/GA/GAAS/libwww-perl-5.837.tar.gz 解壓安裝 tar zxvf libwww-perl-5.837.tar.gz cd libwww-perl-5.837 perl ./Makefile.PL make make test make install 再看獲取數據: /home/htdocs/cacti/scripts/get_nginx_clients_status.pl http://www.t.com/nginx_status 好了nginx_active:12007 nginx_reading:37 nginx_writing:6 nginx_waiting:11964