求助!Centreon----Could not open data sink!
本帖最后由 kaiser1103 于 2010-04-12 13:25 编辑
OS:Centos 5.4/5.2/RedHat 5.4
rpm:php+mysql+nagios+centreon+NDOutils
PS:NDOutils-1.4B9
主要问题:ndomod: Could not open data sink! I'll keep trying, but some output may get lost.
安装完NDOutils以后,重启nagios.
查看log:
- tail -f /usr/local/nagios/var/nagios.log
- [1271046855] Successfully shutdown... (PID=28377)
- [1271046855] ndomod: Shutdown complete.
- [1271046855] Event broker module '/usr/local/nagios/bin/ndomod.o' deinitialized successfully.
- [1271048944] Nagios 3.2.1 starting... (PID=2706)
- [1271048944] Local time is Mon Apr 12 13:09:04 CST 2010
- [1271048944] LOG VERSION: 2.0
- [1271048944] ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
- [1271048944] ndomod: Could not open data sink! I'll keep trying, but some output may get lost...
- [1271048944] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
- [1271048944] Finished daemonizing... (New PID=2707)
- [1271048954] HOST ALERT: localhost;DOWN;SOFT;1;(Host Check Timed Out)
- [1271048954] HOST ALERT: localhost;UP;SOFT;1;PING OK - Packet loss = 0%, RTA = 0.04 ms
- [1271049174] SERVICE ALERT: localhost;SSH;OK;SOFT;2;SSH OK - OpenSSH_4.3 (protocol 2.0)
复制代码如红色所示:
ndo总是提示不能到数据.
关键配置文件如下:
- #vi /usr/local/nagios/etc/nagios.cfg
- broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
- event_broker_options=-1
- # vi /usr/local/nagios/etc/ndomod.cfg
- output_type=tcpsocket
- #output_type=unixsocket
- output=127.0.0.1
- #output=/usr/local/nagios/var/ndo.sock
- buffer_file=/usr/local/nagios/var/ndomod.tmp
- # vi /usr/local/nagios/etc/ndo2db.cfg
- #socket_type=unix
- socket_type=tcp
- #socket_name=/usr/local/nagios/var/ndo.sock
- db_servertype=mysql
- db_name=ndo
- db_user=ndouser
- db_pass=ndopassword
- debug_level=-1
- debug_verbosity=2
- debug_file=/usr/local/nagios/var/ndo2db-debug.log
复制代码我看网上好多这个问题:ndomod: Could not open data sink! I'll keep trying, but some output may get lost...
解决办法都是说是用tcp传输协议,
我都改成TCP的了,但是还是这样.
数据库的ID和pass都是对的.
请高手解惑!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
谢谢楼主。。。。我也是遇到这个问题,改权限就搞定了!!!!
最终的办法:
检查 /usr/local/nagios里的文件的权限.
特别是etc的.
是在是悲剧.,,,
重做一遍,到这里,还是一样的错误,
但是原因不一样了...
查找中...
终于发现:
vi /usr/local/nagios/etc/ndo2db.cfg
ndo2db_user=nagios
ndo2db_group=nagcmd
注意第二个,ndo2db的所属组,是nagcmd.因为前面系统加的用户nagios是nagcmd组的.
所以这里如果写的 ndo2db_group=nagios,就出问题了!!!!
这一点问题,不仔细看,还真是找不出来,