Nagios 1.1
Copyright (c) 1999-2003 Ethan Galstad (nagios@nagios.org)
Last Modified: 06-02-2003
License: GPL
Nagios 1.1 starting... (PID=12395)
Error: Host '192.168.0.6' specified in service 'SMTP' not defined anywhere!
Warning: Host 'mail' has no services associated with it!
Bailing out due to errors encountered while running the pre-flight check. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=12395)
# Описываем шаблон сервиса
define service{
name generic-service
# Имя шаблона
active_checks_enabled 1
# Включить активные проверки
passive_checks_enabled 1
# Принимать результаты пассивных проверок
parallelize_check 1
# Активные проверки лучше выполнять паралельно,
# такой подход повышает скорость работы
obsess_over_service 0
# Эту опцию стоит включать только при создании распределенной
# системы мониторинга.
check_freshness 0
# Следить за свежестью результатов проверок. По умолчанию отключено
notifications_enabled 1
# Уведомления включены
event_handler_enabled 1
# Включить обработчики событий
flap_detection_enabled 1
# Использовать обнаружение мерцания
process_perf_data 1
# Собирать данне об эффективности выполнения проверок
retain_status_information 1
# Сохранять информацию о статусе между перезапусками Nagios
retain_nonstatus_information 1
register 0
# Запрещаем регистрировать это описание как сервис
}
define service{
use generic-service
host_name 192.168.0.6
service_description SMTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_smtp
}
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've compiled the main program and the CGIs to use the same status data storage options (i.e. text file or database). If the main program is storing status data in a text file and the CGIs are trying to read status data from a database, you'll have problems.
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 1.1 Status File
[1104923735] PROGRAM;1104923675;12989;0;0;0;1;1;1;1;0;0;1;0
[1104923735] HOST;mail;UP;1104836571;1104836571;0;87104;0;0;0;0;1;1;1;1;0;0.00;0;1;1;(Host assumed to be up)
[1104923735] SERVICE;mail;SMTP;OK;1/3;HARD;1104853972;1104923975;ACTIVE;1;1;1;1104836571;0;OK;87104;0;0;0;0;0;1;0;0;
1;0;0.00;0;1;1;1;SMTP OK - 5 second response time
# Nagios 1.1 Retention File
CREATED: 1104854271
PROGRAM: 1;1;1;1;0;0;1;0
HOST: mail;0;1104836571;1;17700;0;0;0;0;1;1;0;1;1;1;1104836571;(Host assumed to be up)
SERVICE: mail;SMTP;0;1104853972;0;17700;0;0;0;0;0;1;1;1;1;0;1;1;1;1;1104836571;SMTP OK - 5 second response time
Попробуй запустить в режиме отладки и посмотреть сообщения /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg. Похоже что у тебя грабли с конфами особенно проверь host.cfg, hostgroups.cfg, service.cfg