Cacti和Nagios整合的过程中遇到的错误总结
一、Starting nagios:This account is currently not available nagios启动报错
如果出现如下的提示修改nagios的shell
Starting nagios:This account is currently not available.
# service nagios restart
Running configuration check…done.
Stopping nagios: done.
Starting nagios:This account is currently not available.
done.
解决方法:
修改/etc/passwd
将/sbin/nologin改成/bin/bash
二、查看tail -100 /var/nagios.log日志出现如下错误:
ndomod: Could not open data sink! I'll keep trying, but some output may get lost...
# vim /usr/local/nagios/etc/ndo2db.cfg
ndo2db_user=nagios
ndo2db_group=nagcmd
注意第二个,ndo2db的所属组,是nagcmd.因为前面系统加的用户nagios是nagcmd组的.
三、cacti插件npc提示no hosts
# tail -100 /var/log/messages如下:
ndo2db: mysql_error: 'Unknown column 'long_output' in 'field list''
添加缺失的对应字段
ALTER TABLE npc_eventhandlers ADD long_output TEXT NOT NULL DEFAULT '' AFTER output;
ALTER TABLE npc_hostchecks ADD long_output TEXT NOT NULL DEFAULT '' AFTER output;
ALTER TABLE npc_hoststatus ADD long_output TEXT NOT NULL DEFAULT '' AFTER output;
ALTER TABLE npc_notifications ADD long_output TEXT NOT NULL DEFAULT '' AFTER output;
ALTER TABLE npc_servicechecks ADD long_output TEXT NOT NULL DEFAULT '' AFTER output;
ALTER TABLE npc_servicestatus ADD long_output TEXT NOT NULL DEFAULT '' AFTER output;
ALTER TABLE npc_statehistory ADD long_output TEXT NOT NULL DEFAULT '' AFTER output;
ALTER TABLE npc_systemcommands ADD long_output TEXT NOT NULL DEFAULT '' AFTER output;
阅读(2604) | 评论(0) | 转发(1) |