superwujc 发表于 2013-07-03 11:47

求教——cacti不生成图像?

请教各位大神,小弟的环境是nginx+cacti,现在可以添加交换机,监控端口流量
但web界面无法显示图像




请各位指点一下,谢谢。

chenyx 发表于 2013-07-03 13:52

检查下cacti的那个cron任务运行正常不

superwujc 发表于 2013-07-03 14:57

本帖最后由 superwujc 于 2013-07-03 14:58 编辑

回复 2# chenyx
貌似是nginx没有加载rrdtool模块的原因,手动执行poller.php之后在rra目录下仍然没有rrd文件
脚本执行的结果:sudo php /home/www/cacti/poller.phpPHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 165
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 165
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 166
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 166
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 167
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 167
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 168
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 168
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 169
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 169
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 170
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 170
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 171
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_constants.php on line 171
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 670
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 670
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 671
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 671
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 672
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 672
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 673
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 673
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 674
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 674
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 675
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 675
PHP 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 676
PHP Warning:date(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /home/www/cacti/include/global_arrays.php on line 676系统是debian 6.0 squeeze,nginx,php和mysql是通过apt-get安装,cacti是官网下载的tar包

请问这可能是什么原因,个人觉得是是nginx没有加载rrdtool模块,如果是这样的话,怎样让nginx加载rrdtool?
谢谢。



   

chenyx 发表于 2013-07-03 15:00

那个报错信息是php里面没有设置date.timezone造成的,应该不是问题的主要原因
你进入cacti的页面,看看cacti的配置

陌生丶 发表于 2013-07-03 15:04

本帖最后由 陌生丶 于 2013-07-03 15:05 编辑

你的报错是时区的问题,提示修改时区为Asia/Singapore(新加坡)
修改下php.ini,找到date.timezone,修改成date.timezone=Asia/Singapore,重启apache

superwujc 发表于 2013-07-03 15:07

回复 4# chenyx
但是执行这个脚本之后rra目录仍然是空的,没有任何rrd文件
进入cacti的页面?是我自己搭建的监控页面,还是cacti的官方页面?
不好意思,小弟菜鸟初学,对这个问题没什么思路,请指点一下,谢谢。


   

chenyx 发表于 2013-07-03 15:11

就是你自己的linux,用web访问,进入后再左面有console,找到setting,进去看下吧

superwujc 发表于 2013-07-03 15:31

回复 7# chenyx
没有什么跟这个问题有关系的设置啊


   

chenyx 发表于 2013-07-03 15:49

进入console->setting,里面有个paths卡,在里面有设置rrdtools的地方啊
页: [1]
查看完整版本: 求教——cacti不生成图像?