阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Gentoo 安装Cacti 错误

200次阅读
没有评论

共计 2273 个字符,预计需要花费 6 分钟才能阅读完成。

1.cacti 安装时区出错
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 the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/localhost/htdocs/cacti/lib/functions.php on line 486
02/11/2014 06:25:10 AM – SYSTEM STATS: Time:0.1238 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:1 RRDsProcessed:1
OK u:0.00 s:0.00 r:0.02
解决如下
vim /etc/php/cli-php5.5/php.ini
date.timezone = Asia/Shanghai
vim /etc/php/apache2-php5.5/php.ini
date.timezone = Asia/Shanghai

2. 安装 cacti-spine emerge -avq cacti-spine

登陆 cacti 后设置

Poller Type

The poller type to use. This setting will take effect at next polling interval. spine (默认是 cmd.php)
3. 收集的时候出现
POLLER: Poller[0] Maximum runtime of 300 seconds exceeded. Exiting
http://chinaapp.sinaapp.com/thread-tag/poller-poller0-maximum-runtime-of-298-seconds-exceeded-exiting
报错的原因是因为:cacti php
crontab 里面默认执行时间超过了 300 秒,而 cacti 默认是 5 分钟就是 300 秒去获取一次数据,所以导致有些服务器的数据没有获取。
所以想到了增大 spine 的进程和线程数。cacti->Console->setting->Poller->:
修改 cacti setting 的 poller 设置. settting–>poller: Maximum Concurrent Poller
Processes 把 1 改成 4 Maximum Threads per Process 把 1 改成 2 Number of PHP Script
Servers 把 1 改成 6 即可
4.crontab -l

*/1 * * * * /usr/bin/php /var/www/localhost/htdocs/cacti/poller.php –force &>/dev/null

5.Settings–poller

Poller Interval
The polling interval in use. This setting will effect how often rrd’s are checked and updated. NOTE: If you change this value, you must re-populate the poller cache. Failure to do so, may result in lost data. every minute

Cron Interval
The cron interval in use. You need to set this setting to the interval that your cron or scheduled task is currently running. every minute

不能正常出图,注意查看日志 Console -> Utilities -> View Cacti Log File

 

Cacti 的详细介绍 :请点这里
Cacti 的下载地址 :请点这里

相关阅读

RHEL6.4 中使用 Cacti+Spine 监控主机实现发送邮件报警 http://www.linuxidc.com/Linux/2013-11/92795.htm

RHEL6.4 中使用 Cacti+Spine 监控远程主机 http://www.linuxidc.com/Linux/2013-11/92796.htm

CentOS 5.5 完整安装 Cacti+Spine http://www.linuxidc.com/Linux/2011-12/49701.htm

CentOS 6 下 Cacti 搭建文档 http://www.linuxidc.com/Linux/2013-06/86595.htm

RHEL5.9 下 Cacti 监控部署详解 http://www.linuxidc.com/Linux/2013-06/85427.htm

CentOS 6.3 下 Cacti 安装详解 http://www.linuxidc.com/Linux/2013-05/84279.htm

CentOS Linux 下快速安装配置 Cacti 中文版 http://www.linuxidc.com/Linux/2013-03/81627.htm

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-20发表,共计2273字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中