Chinaunix首页 | 论坛 | 博客
  • 博客访问: 625002
  • 博文数量: 110
  • 博客积分: 3808
  • 博客等级: 中校
  • 技术积分: 1930
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-15 14:32
个人简介

声的伟大!

文章分类

全部博文(110)

文章存档

2014年(1)

2013年(2)

2012年(12)

2011年(81)

2010年(14)

分类: LINUX

2011-12-16 15:11:47

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;
 
阅读(2554) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~