nagios与错误log:
[1354969720] ndomod: NDOMOD 1.5.2 (06-08-2012) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1354969720] ndomod: Could not open data sink! I'll keep trying, but some output may get lost...
[1354969720] Event broker module '/usr/local/nagios/bin//ndomod.o' initialized successfully.
[1354969720] Finished daemonizing... (New PID=31660)
[1354969720] INITIAL HOST STATE: Centreon-Server;DOWN;HARD;5;Warning: This plugin must be either run as root or setuid root.
[1354969720] INITIAL SERVICE STATE: Centreon-Server;Disk-/;UNKNOWN;HARD;3;ERROR: No response from remote host '127.0.0.1'.
[1354969720] INITIAL SERVICE STATE: Centreon-Server;Load;UNKNOWN;HARD;3;UNKNOWN: No response from remote host '127.0.0.1'.
[1354969720] INITIAL SERVICE STATE: Centreon-Server;Memory;UNKNOWN;HARD;3;ERROR: Description Table hrStorageType : No response from remote host '127.0.0.1'.
[1354969720] INITIAL SERVICE STATE: Centreon-Server;Ping;UNKNOWN;HARD;3;Warning: This plugin must be either run as root or setuid root.
[1354969736] ndomod: Still unable to connect to data sink. 0 items lost, 654 queued items to flush.
[1354969752] ndomod: Still unable to connect to data sink. 0 items lost, 715 queued items to flush.
[1354969768] ndomod: Still unable to connect to data sink. 0 items lost, 782 queued items to flush.
[1354969784] ndomod: Still unable to connect to data sink. 0 items lost, 850 queued items to flush.
[1354969800] ndomod: Still unable to connect to data sink. 0 items lost, 919 queued items to flush.
[1354969816] ndomod: Still unable to connect to data sink. 0 items lost, 980 queued items to flush.
[1354969832] ndomod: Still unable to connect to data sink. 0 items lost, 1045 queued items to flush.
检查NDOutils配置问题(vi /usr/local/nagios/etc/ndomod.cfg vi /etc/nagios/ndo2db.cfg )
若配置成功启动nagios日志会出现如下提示
[1354970056] ndomod: Successfully connected to data sink. 1939 queued items to flush.
[1354970056] ndomod: Successfully flushed 1939 queued items to data sink.
[1354970062] ndomod: Error writing to data sink! Some output may get lost...
[1354970062] ndomod: Please check remote ndo2db log, database connection or SSL Parameters
[1354970078] ndomod: Successfully reconnected to data sink! 0 items lost, 59 queued items to flush.
[1354970078] ndomod: Successfully flushed 59 queued items to data sink.
“Warning: This plugin must be either run as root or setuid root”
随即发现所有的host状态都变为down,系统的提示信息为“Warning: This plugin must be either run as root or setuid root”
原来check_icmp需要root的权限执行,于是修改setuid bit的设置
/usr/local/nagios/libexec # chown root:nagios check_icmp
/usr/local/nagios/libexec # chmod 4711 check_icmp
/usr/local/nagios/libexec # ls -alt check_icmp
-rws--x--x 1 root nagios 107328 Apr 28 12:55 check_icmp
[root@localhost ~]# pear install SOAP-0.13.0
Did not download optional dependencies: pear/Mail, pear/Mail_Mime, use --alldeps to download automatically
pear/SOAP requires PEAR Installer (version >= 1.5.4), installed version is 1.4.9
pear/SOAP can optionally use package "pear/Mail"
pear/SOAP can optionally use package "pear/Mail_Mime"
No valid packages found
install failed
解决方法就是: pear upgrade --force PEAR,升级PEAR!