Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 6.10
Sv translation
languageru

Чтобы настроить отправку почтовых уведомлений:

  1. В конфигурационном файле /etc/nagios/private/resource-notify-iw.cfg в качестве значения параметра $USER10$ укажите сервер Postfix, встроенный в систему Traffic Monitor, и используемый порт. Например:
    $USER10$=-S smtp=localhost:25
  2. В конфигурационном файле /etc/nagios/iwmon/iwmon-contacts.cfg добавьте контакты, на которые будут отправляться уведомления. Для этого нужно для каждого контакта добавить секцию вида:
    define contact{
             contact_name                    <название контакта>
             use                             generic-contact
             alias                           Recipient Notification
             service_notification_commands   iw-notify-service-by-email
             host_notification_commands      iw-notify-host-by-email
             email                           <адрес>
             register                        1
    }

    Информация
    titleПримечание:

    Также в этой секции можно указать дополнительные настройки отправки уведомлений, например, время отправки и события, при которых будут отправляться уведомления. Подробную информацию Вы можете найти в документации Nagios.

  3. В этом же файле, в поле members, укажите названия контактов, на которые будут отсылаться уведомления. Контакты указываются через запятую:
    define contactgroup{
            contactgroup_name            admins    
            alias                        IW Nagios Notification Recipient
            members                      <название контакта>, <название контакта1>
    }

  4. Перезапустите Nagios, выполнив следующую команду:
    service nagios restart

Уведомления будут содержать следующую информацию:

  • Название индикатора;
  • Имя сервера, на котором контролируемый индикатор превысил пороговое значение;
  • IP адрес этого сервера;
  • Текущее состояние индикатора;
  • Дата и время превышения порогового значения индикатора;
  • Системное сообщение от источника.

Чтобы настроить отправку почтовых уведомлений для выбранных индикаторов:

  1. Зайдите в каталог подсистемы Nagios:
    cd /etc/nagios/iwmon
  2. Откройте файл iwmon-services.cfg:
    nano mcedit /etc/nagios/iwmon/iwmon-services.cfg:
  3. Для того чтобы определить нужный индикатор, посмотрите поле service_description.
  4. В секции индикатора измените параметр notifications_enabled на:
    • 1 – если вы хотите включить отправку уведомлений
    • 0 – если вы хотите выключить отправку уведомлений
  5. Сохраните изменения.

    Информация
    titleПримечание:

    В случае если в конфигурационном файле отсутствует параметр notifications_enabled, добавьте его вручную.

Sv translation
languageen

To configure sending email notifications:

  1. In the /etc/nagios/private/resource-notify-iw.cfg configuration file, specify a value of the $USER10$ parameter: a Postfix server embedded in Traffic Monitor and the port being used. For example: :
    $USER10$=localhost:25
  2. In the /etc/nagios/iwmon/iwmon-contacts.cfg configuration file, add contacts to send notifications to. For this, add the following section for each contact:
    define contact{
             contact_name                    <contact name>
             use                             generic-contact
             alias                           Recipient Notification
             service_notification_commands   iw-notify-service-by-email
             host_notification_commands      iw-notify-host-by-email
             email                           <address>
             register                        1
    }

    Информация
    titleNote:

    In this section, you can also specify additional options for sending notifications such as sending time or events for which notifications should be sent. For more information, please refer to Nagios documentation.

  3. In the members field of the same file, specify names of contacts to which notifications will be sent. Contacts are separated by commas:
    define contactgroup{
            contactgroup_name            admins    
            alias                        IW Nagios Notification Recipient
            members                      <contact name>, <contact name1>
    }

  4. Restart Nagios with the following command:
    service nagios restart

Notifications will contain the following information:

  • Indicator name
  • Name of server where controlled indicator exceeds the threshold value
  • IP address of this server
  • Current status of the indicator
  • Date and time when the indicator threshold value was exceeded
  • System message from source

To set up e-mail notifications sending only for selected indicators:

  1. Go to the Nagios subsystem directory:
    cd /etc/nagios/iwmon
  2. Open iwmon-services.cfg configuration file:
    nano /etc/nagios/iwmon/iwmon-services.cfg:
  3. To identify the needed indicator, take note of the service_description field.
  4. In the indicator section set the notifications_enabled parameter to:
    • 1 – to enable notifications sending
    • 0 – to disable notifications sending
  5. Save changes.

    Информация
    titleNote:

    If the notifications_enabled parameter is absent in the configuration file, it should be added manually.