Вобщем суть проблемы такова: nagios не выполняет команды нотификации (с выполнением команд проверки хостов при этом проблем никаких не возникает)Для проверки сделал следущее:
в файл commands.cfg
-------------------------------------------
define command{
command_name notify-host
command_line echo "it's work" > /123
}
define command{
command_name notify-service
command_line echo "it's work" > /123
}
-------------------------------------------
Желаемый результат выполнения команды надеюсь понятен )))
соответственно в файл templates.cfg
-------------------------------------------
define contact{
name admin-contact ; The name of this contact template
service_notification_period 24x7 ; service notifications can be sent anytime
host_notification_period 24x7 ; host notifications can be sent anytime
service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
service_notification_commands notify-service ; send service notifications via icq
host_notification_commands notify-host ; send host notifications via icq
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
}
------------------------------------------------------------
а так же в этот же файл
-------------------------------------------------------------
define host{
name 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 freebsd-server ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
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)
check_command check-host-alive ; Default command to check FreeBSD hosts
notifications_enabled 1
notification_period 24x7 ; FreeBSD admins hate to be woken up, so we only notify during the day
notification_interval 5 ; Resend notifications every 5 minutes
notification_options d,u,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
-------------------------------------------------------------
Закрыл icmp на хосте,в веб морде он соответственно покраснел и в разделе Reports,Notifications соответственно появилась строка:
Hostname N/A HOST DOWN 07-12-2009 11:03:49 suslick notify-host PING CRITICAL - Packet loss = 100%
Реакции на эти действия в файле /123 к сожалению не наблюдаются, и так не только с моей тестовой командой,со всеми дефолтными та же шляпа в логах при этом ничего умного не пишет
Может чего не доглядел? (((((
Очень надеюсь на вашу помощь, заранее спасибо