搭建cacti 期间问题总结

1、配置snmpd.conf 调用外部shell程序,使用exec 关键字报错
解决办法:在RHEL5默认使用的是snmp5.3 这个版本支持exec 这个关键字,但是RHEL6 使用的版本是5.5 ,这个版本已经不支持exec ,只支持pass 和 extend 这两个关键字。
用法:
extend .1.3.6.1.4.1.2021.50 shelltest /usr/bin/sh  /tmp/test.sh

2、Cacti 搭建完成后,浏览器访问cacti 安装界面时一片空白,也没有报错,即无法显示以下界面:
133823525.png
解决办法:检查是否已经导入cacti 数据
[root@cacti html]# mysql -ucacti -pcacti cacti </usr/local/nginx/html/cacti/cacti.sql

3、Cacti 搭建完成后,发现图像显示不出,如下图:
133853674.png
解决办法:
(1)检查以下包是否都已经安装
yum -y install zlib libpng freetype libart_lgpl libart_lgpl-devel libxml* pango*

(2)检查rra 目录下是否已经生成rrd 文件
Console -> Data Source -> 选择没有图像的数据源 -> Turn On Data Source Debug MTurnode
复制调试命令到监控端以 cacti 用户执行
执行后会生成 rrd 文件
133922805.png
localhost_load_1min_5.rrd    localhost_mem_swap_4.rrd  localhost_users_6.rrd date.timezone = Asia/Shanghai

修改完可能要重启

(2) poller 执行后, cacti 日志没有报错,但还是没数据
解决方法:

CactiUtilities>System Utilities>Rebuild Poller Cache 清空缓存即可



6、安装完cacti 图表英文也乱码
134149618.jpg

原因是:当时我安装的环境是自己定制的一个centOS6 系统,本来没有装中文补丁,按理应该不会乱码才对,后来发现/usr/share/fonts/ 目录下没有任何ttf 文件

解决办法:随便放个字体到/usr/share/fonts/目录下即可
134226318.jpg

7、有以下错误提示:
134425980.jpg

    网上资料大部分说只要设置php.ini 中的date.timezone = Asia/Shanghai 即可。但是在Php5.3版本下,这个方法并没有作用
解决办法:
根据错误提示
Warning : strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/cacti/include/global_constants.php on line 166

[root@localhost install]# vim /usr/local/cacti/include/global_constants.php
根据提示,在166行加入了一下内容:
date_default_timezone_set('Asia/Shanghai');
页面即恢复正常


8、cacti安装完后就停留在登陆界面,输入默认的用户名密码登陆不进去!
centos5下-----信息不全 , 配置问题-----呵呵我也碰到同样的问题。我把解决办法写上来看能不能帮助同样问题的你。:)在login屏幕一直不能登录进去,输入admin密码admin后还会是停止在登录屏幕,要求输入用户和密码.百思不得其解,后面在cacti的官方论坛上找答案,发现有人有同样的问题,他有发apache的日志。突然一想,我也可以看看apache的日志。打开日志一看,发现了问题。查日志:[client 59.41.223.152] PHP Warning: Unknown(): open(/var/lib/php/session/sess_e7efb8dcf3a41b026edb7aecdd7b3404, O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer: http://cacti.abc.com.cn/index.php[client 59.41.223.152] PHP Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0, referer: http://cacti.abc.com.cn/index.php原来是/var/lib/php/session 对当前运行apache的账户nobody无写权限。chmod 777 session 后。问题消失。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值