使用Cacti时常见问题集.doc
文本预览下载声明
以前自己曾经解决的,当时自己记住了,过了好长时间,重新在新的机器上安装cacti的时候,却忘记提前修改,导致一些不必要的麻烦。帖出来希望对自己或者对大家有帮助
1、一般说来,图片的流量统计描述都是 |host_description| - Traffic - |query_ifName| 按照这个形式来描述的,对于华为的设备,Gi显示成GigabitEthernet,可能导致后面的模块号,端口好无法显示。如 GigabitEthernet4/3/2显示成GigabitEthernet,解决办法:Console - Settings - Visual - Maximum Field Length: 默认 15,我修改成30就OK了。The maximum number of characters to display for a data query field.2、对于Traffic 大于800Mbits/s的无法显示问题,在创建graph前修改 Data Templates - Interface Traffic - 1: traffic_in - Maximum Value Use Per-Data Source Value 默认是 后面再添 几个0就OK了,同样 2: traffic_out也要修改哦,最好在使用new graph创建新的graph之前修改后,否则之后修改会有一定的麻烦,甚至无法正常工作。
3、以前都是直接下载tar.gz源代码包安装的,按照readme就可以搞定一切。目前在FC4下可以直接通过yum instal cacti就安装完成,安装后却不知道怎么使用,也不知道安装到什么地方了,怎么让cacti工作。
首先了解rpm包安装了那些有用的文件:rpm程序把cacit的php文件放到/usr/share/cacti目录下。在/etc/httpd/conf.d/cacit.conf==============================## Cacti: An rrd based graphing tool#Alias /cacti??? /usr/share/cactiDirectory /usr/share/cacti/??????? Order Deny,Allow??????? Deny from all??????? Allow from /Directory==============================在apache的配置里面只允许localhost访问/cacti这个虚拟目录。
[root@elm ~]# cd /etc/cron.d[root@elm cron.d]# more cacti*/5 * * * *???? cacti?? /usr/bin/php /usr/share/cacti/poller.php /dev/null 21[root@elm cron.d]#
定期执行程序的cron配置。
下面介绍如何让cacti工作:首先,配置数据库:[root@elm local]# cd /usr/share/doc/cacti-0.8.6h/[root@elm cacti-0.8.6h]# lscacti.sql? docs? LICENSE? README[root@elm cacti-0.8.6h]# mysqlWelcome to the MySQL monitor.? Commands end with ; or \g.Your MySQL connection id is 312 to server version: 4.1.16Type help; or \h for help. Type \c to clear the buffer.mysql create database cacti_test;Query OK, 1 row affected (0.12 sec)mysql \qBye[root@elm cacti-0.8.6h]# mysql cacti_test cacti.sql
修改cacit的配置文件:
[root@elm cacti-0.8.6h]# cd /usr/share/cacti/include/[root@elm include]# cat db.php?/* make sure these values refect your actual database/host/user/password */$database_type = mysq
显示全部