nagios: notifications and event handlers (не отрабатываются команды...)

Софт под Linux, разные программы, но только связанные с Linux

Модератор: /dev/random

fd8
Сообщения: 2

nagios: notifications and event handlers

Сообщение fd8 »

Привет!

Nagios 2.0b3
У меня следующая проблема: надо настроить отправку уведомлений об изменении статуса сервиса. Однако отправки не происходит, причем в логах нет никаких сообщений ни об ошибке, ни о самом факте отправки.

Настройки уведомлений выглядят следующим образом:

#------------------------------------------------------------------------------------
nagios.cfg:
enable_notifications=1
log_notifications=1


misccommands.cfg:

# 'notify-by-icq' command definition
define command{
command_name notify-by-icq
command_line /usr/bin/printf "%b" "***** Nagios *****" | /usr/local/nagios/bin/testnotif
}

# 'host-notify-by-icq' command definition
define command{
command_name host-notify-by-icq
command_line /usr/bin/printf "%b" "***** Nagios *****" | /usr/local/nagios/bin/testnotif
}



minimal.cfg:

define contact{
contact_name nagiosadmin
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-by-icq
host_notification_commands host-notify-by-icq
email qq@yandex.ru
}

define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}

define host{
use generic-host ; Name of host template to use
host_name MySwitch
alias MySwitch
address 192.168.0.1
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period 24x7
notification_options d,r
contact_groups admins
}

#здесь сохранены стандартные настройки
define service{
name generic-service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
...
notifications_enabled 1 ; Service notifications are enabled
...
}

define service{
use generic-service ; Name of service template to use
host_name MySwitch
service_description Int Status: test
is_volatile 0
check_period 24x7
max_check_attempts 4
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_interval 960
notification_period 24x7
check_command
check_snmp_cisco_ifstatus!FastEthernet1/0/23!somecommunity
}
#--------------------------------------------------------------------------------------


Скрипт /usr/local/nagios/bin/testnotif содержит строчки:

#--------------------------------------------------------------------------------------
#!/bin/sh

echo "notification has been sent" > /usr/local/nagios/bin/incomings.msg
#--------------------------------------------------------------------------------------

Права на скрипт выставлены так - nagios.nagios. Файл "incomings.msg" имеет те же права.

Но "incomings.msg" как был пустым, так и остается (и после "мягких", и после "жестких" проблем)....
Спасибо сказали:
Аватара пользователя
xorader
Сообщения: 1030
Статус: собирающий миры
ОС: Debian

Re: nagios: notifications and event handlers

Сообщение xorader »

команда mail в системе работает ?
Molchanov Alexander (aka Xor)
*offtopic* - ololo!
Спасибо сказали:
fd8
Сообщения: 2

Re: nagios: notifications and event handlers

Сообщение fd8 »

в системе работает, но не настроена. Мне надо сообщения на аську отправлять. Когда я вызываю ту же команду "testnotif" через event_handler, все работает нормально...
Спасибо сказали: