寻觅生命中的那一片浅草......

cacti的几个常见模块安装配置

一. squid
1. squid编译时要加入参数–enable-snmp
编辑squid.conf,加入如下行
snmp_port 3401
acl snmppublic snmp_community blog.zhangjianfeng.com
snmp_access allow snmppublic
snmp_incoming_address 0.0.0.0
snmp_outgoing_address 255.255.255.255
2.编辑snmpd.conf,加入如下行
view systemview included .1.3.6.1.4.1.3495.1
proxy -v 1 -c blog.zhangjianfeng.com 127.0.0.1:3401 .1.3.6.1.4.1.3495.1
# 可以手工检查 snmpwalk -v 1 -c blog.zhangjianfeng.com squidIP  .1.3.6.1.4.1.3495.
3.下载三个模版文件
wget http://forums.cacti.net/download.php?id=346
wget http://forums.cacti.net/download.php?id=345
wget http://forums.cacti.net/download.php?id=347
4.在cacti管理页面中导入相关xml文件–”Import Templates”

二.mysql
http://www.faemalia.net/mysqlUtils/
– cacti server
Put mysql_stats.php and dumpMemcachedStats.php in cacti/scripts/
Import  .XMLs
– mysql server
GRANT PROCESS ON *.* TO cactiuser@’%’ IDENTIFIED by ‘iloveyou’;
GRANT SUPER ON *.* TO cactiuser@’%’ IDENTIFIED BY ‘iloveyou’;

三.apache
http://forums.cacti.net/about9861.html
导入两个xml
将pl脚本放到cacti/scripts/目录下
—apache服务器
ExtendedStatus On

SetHandler server-status
Order deny,allow
Deny from all
Allow from cactiserverip

四.nginx
http://forums.cacti.net/about26458.html
– nginx server
location /nginx_status {
stub_status on;
access_log off;
}
– cacti server
cp get_nginx_clients_status.pl /scripts/
cp get_nginx_socket_status.pl /scripts/
chmod 0755 /scripts/get_nginx_socket_status.pl
chmod 0755 /scripts/get_nginx_clients_status.pl
手工检查 get_nginx_clients_status.pl http://nginx.server.ip/nginx_status
# 如出现no (LWP::UserAgent not found)
# perl -MCPAN -e shell
# cpan> install LWP::UserAgent
在CACTI中建图的时候需要填写一下URL of nginx stub status为完整URL,如http://xx.xx.xx.xx/NginxStatus

五.memcached
http://dealnews.com/developers/cacti/memcached.html
1. Python Client API Installation
下载python-memcached ftp://ftp.tummy.com/pub/python-memcached/
tar xzf python-memcached-.tar.gz
python setup.py install
2. Template Installation
wget http://content.dealnews.com/dealnews/developers/cacti-memcached-1.0.tar.gz
复制memcached.py 到 /scripts/
测试 python /scripts/memcached.py -p portnumber
默认端口号是11211,如果memcache的监听端口不是这个,需要调整
1). Data Input Methods – Memcached – Statistics
2). Under the Data Input Methods section, in the Input String textbox, add -p PORT before
e.g. python /scripts/memcached.py -p 2345

# Last modified at: February 13th, 2009 11:14am

载自:  Jeffrey’s Blog [http://blog.zhangjianfeng.com]
本文链接:  http://blog.zhangjianfeng.com/article/1166

尚无评论

发表评论

2024年四月
« 5月    
1234567
891011121314
15161718192021
22232425262728
2930