標籤: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:
Check the Nagios log file for messages relating to startup or status data errors.
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連絡人郵箱錯誤導致nagios無法啟動