nagios联系人邮箱错误导致nagios无法启动

Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:


  1. Check the Nagios log file for messages relating to startup or status data errors.

  2. Always verify configuration options using the -v command-line option before starting or restarting Nagios!


Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.


如上错误。


执行检查命令

此命令在nagios安装目录/bin目录中
./nagios -v ../etc/nagios.cfg

Error: Could not find any contact matching 'cookie' (config file '/usr/local/nagios/etc/objects/contacts.cfg', starting on line 97)

Error: Could not expand member contacts specified in contactgroup (config file '/usr/local/nagios/etc/objects/contacts.cfg', starting on line 97)

   Error processing object config files!

显示联系人配置文件出错

打开contacts.cfg

检查第97行:

97define contactgroup{

98         contactgroup_name       admins

99         alias                   Nagios Administrators

100        members                 xx,yy,cookie,zz

101         }

发现联系人组中有个成员名叫cookie,而在上面定义的联系人中并没有cookie这个成员,所以在组中将cookie成员删除

再次运行检查命令

./nagios -v ../etc/nagios.cfg

Total Warnings: 0

Total Errors:   0


Things look okay - No serious problems were detected during the pre-flight check

已无报错信息

service nagios start    正常启动

打开nagios站点,监控已正常

你可能感兴趣的:(nagios,联系人,邮箱错误)