Имеем голый ALT.
Ставим Apache
apt-get install apache2
Ставим Nagios
apt-get install nagios-full
apt-get install nagios-www-apache2
Добавляем пользователя в Nagios
htpasswd2 -c /etc/nagios/nagios.web-users USER
На всякий случай
chown -R nagios:nagios /etc/nagios
chown -R nagios:nagios /usr/share/nagios/
Разрешаем доступ на Web морду (там всё понятно)
vi /etc/httpd2/conf/addon.d/A.nagios.conf
И последний штрих
[b]vi /etc/nagios/cgi.cfg[/b]
authorized_for_all_hosts=USER
Рестартуем Nagios с Apache и радуемся жизни.
Минимальный конфиг
[b]vi /etc/nagios/objects/CFGS/servers.cfg[/b]
define hostgroup{
hostgroup_name hosts
}
define host{
use servers
host_name Terminal_1
address 192.168.0.1
hostgroups hosts
}
define service{
use generic-service
host_name Terminal_1
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
[b]vi /etc/nagios/objects/CFGS/definehost.cfg[/b]
define host{
use generic-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
define host{
name servers ; The name of this host template
use generic-host
check_period 24x7 ; By default, FreeBSD hosts are checked round the clock
check_interval 5 ; Actively check the host every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each FreeBSD host 10 times (max)
notification_period 24x7
notification_interval 30
notification_options d,u,r
check_command check-host-alive
contact_groups admins ; Notifications get sent to the admins by default
register 0
}
define service{
use generic-service
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
notification_interval 60 ; Re-notify about service problems every hour
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
Необходимо создать ссылки на данные файлы или на каталог с файлами в файле
/etc/nagios/nagios.cfg