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

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

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMIG and version 7.7
Sv translation
languageru
Предупреждение
titleВажно!

Перед обновлением Traffic Monitor обновите cервер Device Monitor.

В версиях до 7.2 в инсталляторе были доступны два типа серверов:

  • сервер TM (тип установки TME Node Server), по активным компонентам соответствующий шаблонам Веб-консоль и Перехватчики;
  • сервер СУБД (тип установки TME DB Server), по активным компонентам соответствующий шаблонам База данных и Индексер.

В инсталляторе Traffic Monitor реализована система шаблонов, представляющих из себя функциональные наборы компонентов. Подробнее о шаблонах смотрите в статье "Схемы развертывания Системы и выбор типа установки".
Доступны четыре шаблона:

  • База данных (Database);
  • Индексер (Indexer service);
  • Веб-консоль (Web console);
  • Перехватчики (Traffic interceptors).

Обновлению подлежат все серверы, на которых установлены компоненты Traffic Monitor.

Инсталлятор Traffic Monitor при обновлении с участием пользователя может работать в двух режимах:

  • текстовый в консоли сервера;
  • графический.

Шаги установки и их последовательность аналогичны в обоих режимах.

Также доступен тихий режим работы инсталлятора без участия пользователя.

Независимо от выбранного режима работы инсталлятора, для обновления понадобится использовать консоль (или терминал) сервера.

В процессе обновления на сервер будут установлены все пакеты Traffic Monitor, но при завершении работы инсталлятор запустит только те сервисы, которые до обновления не были отключены.

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

Если сервис был отключен, после обновления он не будет запущен.

Если сервис был остановлен, после обновления он будет запущен.

Статусы новых сервисов будут соответствовать первичной установке.

Распаковка пакетов начнется не при запуске инсталлятора, а непосредственно перед обновлением.

Предупреждение
titleВажно!

Каждый сервер должен иметь уникальный корректный FQDN.

Перед обновлением Системы, выполните следующие действия на каждом обновляемом сервере:

  1. Откройте консоль обновляемого сервера:
    • в случае физического сервера - консоль отображается на экране монитора, подключенного к серверу;
    • в случае виртуального сервера - выполните команду Launch Virtual Machine Console (см. пример ниже).

      Откроется окно с консолью сервера.
  2. Введите логин и пароль, чтобы войти в операционную систему (вход выполняется от имени пользователя root).

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

    Команды в консоли вводятся с помощью клавиатуры и обязательно подтверждаются нажатием клавиши Enter, поэтому в данной инструкции под "введите команду command" подразумевается "введите команду command и нажмите Enter". После выполнения команды снова отображается приглашение - оно заканчивается знаком # или $ (в зависимости от того, от имени какого пользователя выполнен вход). Прежде чем вводить следующую команду, нужно убедиться, что в командной строке отображается приглашение.

    Если вы используете удаленное подключение по протоколу SSH, рекомендуется использовать утилиту Screen. Это позволит избежать проблем в случае разрыва соединения с обновляемым сервером. При отключении от утилиты запущенные в ней процессы не прервутся, что позволит безопасно продолжить обновление Системы.
    Важно! Использование Screen особенно рекомендуется при работе с БД и обновлении СУБД.

    Основные команды:

    • screen - запустить утилиту;
    • Ctrl+a d - отключиться от screen (вводится в окне screen);
    • screen -ls - вывести список запущенных screen;
    • screen -r - повторно подключиться к screen;
    • screen -r name - подключиться к определенному screen с именем «name»;
    • exit - выйти из screen (вводится в окне screen).
  3. Введите команду для вызова файлового менеджера:

    mc

    На экране отобразится окно файлового менеджера Midnight Commander, в котором удобно просматривать файлы.
    Навигация в файловом менеджере осуществляется при помощи стрелок клавиатуры и клавиши Enter или при помощи мыши. При этом без дополнительных действий вы можете вводить команды в командной строке (она видна в нижней части экрана).

    Для перехода на уровень выше установите курсор в поле /.. (первая строка в файловом менеджере) и нажмите Enter.

  4. Проверьте версию и тип установки обновляемого сервера:

    Версия и тип установки указаны в файле /opt/iw/tm5/install_mode.

    Блок кода
    languagetext
    titleПример содержимого
    {
      "product_type": "tme",
      "version": "7.45.10.130131",
      "all_in_one": false,
      "templates": {
        "db": {
          "local": true
        },
        "indexer": {},
      }
    }

    Запись из примера соответствует серверу с распределенной установкой Traffic Monitor Enterprise версии 7.45.10.130131. На сервере из примера активированы шаблоны База данных и Индексер. Используется локальная база данных.

  5. Для выхода из файлового менеджера (требуется для лучшего контроля выполнения команд) введите команду:
    exit
Предупреждение
titleВажно!

Перед обновлением Системы убедитесь, что сервер соответствует требованиям к настройкам ОС и сети сервера.

После обновления параметры unit-файлов системы инициализации systemd вернутся к значениями по умолчанию.

Примечание
titleВнимание!

Якорь
Backup
Backup
Чтобы в случае ошибки иметь возможность восстановить базу данных и возобновить процесс обновления с последнего успешного этапа, рекомендуется выполнить:

  1. Раскрыть
    titleРезервное копирование базы данных и индексов
    Предупреждение
    titleВажно!

    Для успешного восстановления файлы обязательно должны быть скопированы с сохранением их прав, пользователей и групп.
    Для этого копируйте файлы только на файловую систему Linux (например, Ext4 или XFS).
    Храните резервные копии либо на другом разделе сервера, либо на другом сервере, либо на внешнем устройстве. Убедитесь, что данные не будут потеряны.
    Для восстановления резервные копии будет необходимо скопировать по адресам исходных файлов, не изменяя прав, пользователей и групп.

    1. На всех серверах остановите сервисы Тraffic Мonitor:
      iwtm stop
    2. На сервере с шаблоном Веб-консоль:
      1. Введите команду:
        systemctl stop iwtm-php-fpm
      2. Создайте резервную копию конфигурации службы iw_adlibitum. Для этого:

        1. Перейдите в директорию /opt/iw/tm5/etc и откройте на просмотр файл adlibitum.conf.

        2. В параметре "ConfigDir" указан относительный путь к директории с конфигурации службы iw_adlibitum. Путь к директории указывается относительно содержимого параметра "NookDir".
          Скопируйте директорию с конфигурацией либо на другой раздел сервера, либо на другой сервер, либо на внешнее устройство. 

    3. На сервере с шаблоном Индексер:
      1. Введите команду для остановки службы iw_indexer:
        iwtm stop indexer
      2. Создайте резервную копию индексов. Для этого:
        1. Перейдите в директорию /opt/iw/tm5/etc и откройте на просмотр файл indexer.conf.

        2. В параметре "SphinxBaseDir" указан путь к директории с индексами. В параметре "ArchiveDir" указан относительный путь к архивам индексов. Путь к архивам указывается относительно содержимого параметра "NookDir".
          Скопируйте директории с индексами и архивами индексов либо на другой раздел сервера, либо на другой сервер, либо на внешнее устройство

    4. На сервере с шаблоном База данных:
      1. В зависимости от используемой СУБД и установленной версии Traffic Monitor введите команду для остановки Базы данных:

        • для СУБД Oracle
          systemctl stop oracle
        • для СУБД PostgreSQL
          systemctl stop postgresql-13

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

          Для уточнения директорий, содержащих Базу данных, проверьте также содержимое файла:

          • /opt/iw/tm5/csw/oracle/database.conf (для СУБД Oracle)

          • /opt/iw/tm5/csw/postgres/database.conf (для СУБД PostgreSQL)
      2. Создайте резервную копию Базы данных. По умолчанию База данных расположена в директориях  /u01, /u02  и т.д.
        Скопируйте Базу данных либо на другой раздел сервера, либо на другой сервер, либо на внешнее устройство.
      3. Создайте резервную копию индексов. Для этого:
        1. Перейдите в директорию /opt/iw/tm5/etc и откройте на просмотр файл indexer.conf.

        2. В параметре "SphinxBaseDir" указан путь к директории с индексами. В параметре "ArchiveDir" указан относительный путь к архивам индексов. Путь к архивам указывается относительно содержимого параметра "NookDir".
          Скопируйте директории с индексами и архивами индексов либо на другой раздел сервера, либо на другой сервер, либо на внешнее устройство.

  2. Раскрыть
    titleРезервное копирование настроек окружения

    Обязательно учитывайте особенности копирования из предупреждения в предыдущем шаге. Перейдите по адресам и скопируйте указанные файлы:

    • Раскрыть
      titleДля СУБД Oracle:
      • /opt/iw/tm5/etc/oracle/ - все файлы в директории
      • /etc/default/iwtm
      • /etc/profile.d/iw-oracle-env.sh
      • /etc/logrotate.d/iwtm-oracle-conf-server
      • /opt/iw/tm5/etc/oracle.conf
    • Раскрыть
      titleДля СУБД PostgreSQL:
      • /etc/default/iwtm
      • /etc/profile.d/iw-postgresql-env.sh
      • /etc/profile.d/iw-postgresql-client-env.sh
      • /etc/sudoers.d/iw-pgagent
      • /etc/pgagent/pgagent-13.conf
      • /opt/iw/tm5/etc/postgresql/ - все файлы в директории
      • /opt/iw/tm5/etc/postgresql.conf
    Информация
    titleПримечание:
    Также инсталлятор автоматически создает копии файлов настроек окружения в директории /tmp/iwtm_db_configs_backup. Для удобства пользователя инсталлятор воссоздает в директории пути оригинальных файлов, по которым их нужно будет скопировать для восстановления исходного состояния.
    Созданные инсталлятором резервные копии хранятся только до успешного обновления. По завершении они будут удалены.

Выберите инструкцию в зависимости варианта обновления:

  1. Откройте в директории /etc/yum.repos.d файл, в котором указаны настройки подключения к репозиторию Updates. Убедитесь, что в нём нет исключения в виде строки:
    exclude=postgresql13*
    Если строка имеется, удалите её.
  2. Выполните команду для обновления пакетов:
    yum upgrade
  3. Выполните команду для вывода списка пакетов:
    rpm -qa | grep postgresql13
  4. Проверьте, чтобы в выводе команды версии пакетов были не ниже 13.5-5. Если версии пакетов ниже, обновите их.
  5. Остановите сервис PostgreSQL командой:
    systemctl stop postgresql

  6. Введите команду для создания директории:
    mkdir -p /opt/distr/postgresql
  7. Перейдите в созданную директорию:
    cd /opt/distr/postgresql
  8. Распакуйте архив с пакетами для СУБД и перейдите в созданную после распаковки директорию с помощью команд вида:
    tar --verbose -C "/opt/distr/postgresql" -xzf "<путь_к_архиву_iwtm-postgresql-13.8-x.x.x.xxx-redos-7.3.tar.gz>"
    cd iwtm-postgresql-13.8-x.x.x.xxx-redos-7.3
    В нашем примере:
    tar --verbose -C "/opt/distr/postgresql" -xzf "/root/iwtm-postgresql-13.8-7.5.0.125-redos-7.3.tar.gz"
    cd iwtm-postgresql-13.8-7.5.0.125-redos-7.3
  9. Для переустановки дополнительных пакетов выполните команду:

    rpm --reinstall -i pgagent_13-4.2.1-1.el7.iw.x86_64.rpm pg_stat_kcache_13-2.1.3-1.el7.x86_64.rpm pg_pathman13-1.5.12-1.el7.iw.x86_64.rpm

  10. Для перенастройки сервиса последовательно выполните команды:
    mv /etc/systemd/system/postgresql.service.d/ /etc/systemd/system/postgresql-13.service.d/
    systemctl daemon-reload
    systemctl start postgresql-13

  11. Проверьте статус сервиса командой:
    systemctl status postgresql-13

Пропустите следующее действие

chmod u+x /root/iwtm-installer-7.5.0.125-rhel7

  • Подключите внешние или локальные репозитории Red Hat Enterprise Linux 7.

    С инструкцией по настройке локального репозитория можно ознакомиться на официальном сайте Red Hat Enterprise Linux (страница доступна на английском языке).

  • /root/iwtm-installer-7.7.0.101-rhel7

  • Подключите внешние или локальные репозитории ОС.

    Например, с инструкцией по настройке локального репозитория в  Red Hat Enterprise Linux можно ознакомиться на официальном сайте (страница доступна на английском языке).

  • Для обновления пакетов введите команду:
    yum upgrade

    Будет выведен запрос вида:


    Для продолжения наберите Y на клавиатуре и нажмите Enter.

  • Если у вас установлена система Prometheus, на сервере с шаблоном База данных для остановки службы выполните команду:

    systemctl stop iwtm-postgres_exporter - для СУБД PostgreSQL
    systemctl stop iwtm-oracledb_exporter - для СУБД Oracle

  • На сервере с шаблоном База данных перед запуском инсталлятора рекомендуется запустить сервис базы данных, если ранее он был остановлен. В зависимости от используемой СУБД введите команду для запуска:

    • service oracle start (для СУБД Oracle)
    • service postgresql-13 start (для СУБД PostgreSQL)
  • Введите команду для перехода в директорию c дистрибутивами Traffic Monitor:
    cd /root
  • В инсталляторе реализован механизм автоматического объединения конфигурационных файлов Traffic Monitor старой и новой версии.

  • Раскрыть
    titleОбновление Системы поверх установленной

    Якорь
    7.2
    7.2

    Предупреждение
    titleВажно!

    Крайне рекомендуется выполнить резервное копирование Системы, а также клонировать ее и провести обновление на этой тестовой машине.

    Остановку сервисов инсталлятором и запуск обновления выполняйте в следующей последовательности шаблонов:

    1. Перехватчики

    2. Индексер
    3. Веб-консоль
    4. База данных

    Процесс обновления серверов инсталлятором аналогичен для всех шаблонов. Если действие, относится только к серверу с конкретным шаблоном, это будет указано. Остальные действия относятся ко всем серверам.

    Порядок обновления следующий:

    Шаг 1. Обновление всех серверов.
    Шаг 2. Проверка кластера службы Consul.
    Шаг 3. Проверка работоспособности внутренних сервисов Системы.
    Шаг 4. Завершение обновления серверов.


    Якорь
    7.2 Шаг 1
    7.2 Шаг 1
    ШАГ 1. ОБНОВЛЕНИЕ ВСЕХ СЕРВЕРОВ

    Чтобы обновить серверы, на каждом из них выполните следующие действия:

    1. Скопируйте в директорию /root файлы, поставляемые в дистрибутиве InfoWatch Traffic Monitor:
      • iwtm-installer-x.x.x.xxx-rhel7 - для обновления на ОС Red Hat Enterprise Linux , CentOS или Oracle Linux (где x.x.x.xxx - номер сборки);
      • iwtm-postgresql-13.8-x.x.x.xxx-rhel7.tar.gz - если будет использована СУБД PostgreSQL на ОС Red Hat Enterprise Linux , CentOS или Oracle Linux;
      • iwtm-installer-x.x.x.xxx-redos-73 - для обновления на РЕД ОС;
      • iwtm-postgresql-13.8-x.x.x.xxx-redos-73.tar.gz - если будет использована СУБД PostgreSQL на РЕД ОС;
      • iwtm-oracle-19.0.0.0.0-x.xx.x.tar.gz - если будет использована СУБД Oracle.
      В нашем примере: 
      • iwtm-installer-7.57.0.125101-rhel7 - для обновления на ОС Red Hat Enterprise Linux , CentOS или Oracle Linux;
      • iwtm-postgresql-13.8-7.57.0.125101-rhel7.tar.gz - если будет использована СУБД PostgreSQL на ОС Red Hat Enterprise Linux , CentOS или Oracle Linux;
      • iwtm-installer-7.57.0.125101-redos-73 - для обновления на РЕД ОС;
      • iwtm-postgresql-13.8-7.57.0.125101-redos-73.tar.gz - если будет использована СУБД PostgreSQL на РЕД ОС;
      • iwtm-oracle-19.0.0.0.0-7.57.0.125101.tar.gz -  если если будет использована СУБД Oracle.

        Предупреждение
        titleВажно!

        Далее будет описано обновление с использованием инсталлятора для ОС Red Hat Enterprise Linux.
        Данная инструкция актуальна и для других поддерживаемых ОС: Oracle Linux , CentOS и РЕД ОС.

    2. Чтобы сделать файл iwtm-installer-x.x.x.xxx-rhel7 исполняемым, введите команду:
      chmod u+x /root/iwtm-installer-x.x.x.xxx-rhel7

      В нашем примере команда будет следующей:

    Раскрыть
    titleЕсли вы обновляетесь на РЕД ОС с Traffic Monitor версии ниже 7.4.2, на сервере с шаблоном База данных:
    Предупреждение
    titleВажно!

    Автоматическое объединение затрагивает только конфигурационные файлы Traffic Monitor с расширением .conf, расположенные в директории /opt/iw/tm5/etc.
    Перед объединением в директории /opt/iw/tm5/etc_conf_backup_<дата_время> будут созданы резервные копии исходных конфигурационных файлов. Пример названия директории: /opt/iw/tm5/etc_conf_backup_05.06.2022_09:26:33.
    После успешного объединения файлы с расширением.rpmnew, которые относятся к затрагиваемым конфигурационным файлам, будут удалены.
    Все выполненные действия будут отражены в лог-файле /var/log/infowatch/iwtm-install-<версия>-<дата>_<время>.log. Пример названия лог-файла: /var/log/iwtm-install-7.57.0.125101-2022-09-10_09-56-25.log.
    Также информацию о процессе можно найти в директории /var/log/infowatch/config_merge/.
    Если во время действий с конфигурационным файлом будут обнаружены ошибки, процесс будет остановлен до исправления ошибок пользователем. После исправления ошибок повторно запустите обновление.

    Запустите инсталлятор в одном из режимов:

    • Раскрыть
      titleобновление в текстовом режиме в консоли сервера

      Чтобы обновить Traffic Monitor в консоли сервера, выполните следующие действия:

      1. Для обновления Traffic Monitor запустите инсталлятор, выполнив следующую команду:

        ./iwtm-installer-x.x.x.xxx-rhel7

        В нашем примере команда будет следующей:

        ./iwtm-installer-7.57.0.125101-rhel7

        Начнется подготовка к запуску инсталлятора. На данном этапе не производится распаковка файлов.

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

        Перед запуском инсталлятора может быть выведено предупреждение о некорректном владельце файлов.

        Введите Y и нажмите Enter, чтобы инсталлятор исправил владельца файлов и продолжил запуск.
        В противном случае введите N, нажмите Enter, исправьте несоответствие вручную или с помощью скрипта /tmp/iwtm_installer/scripts/check_iwtm.sh и повторно запустите инсталлятор.

        Предупреждение
        titleВажно!

        При отсутствии настроенных и доступных репозиториев ОС, запуск инсталлятора прервется со следующей ошибкой:

        При возникновении данной ошибки нажмите Enter для завершения работы инсталлятора, затем подключите стандартный репозиторий RHEL, репозиторий EPEL и повторно запустите инсталлятор.

        Подробную информацию об ошибке вы можете найти в лог-файлах, указанных в предупреждении.


        По завершении на экране отобразится окно приветствия вида:
        Image RemovedImage Added
        В окне будут указаны доступные обновления для Traffic Monitor и СУБД.

      2. Для продолжения введите Y и нажмите Enter. Для выхода из инсталлятора введите N и нажмите Enter.

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

        При обновлении в консоли сервера перед полем ввода в квадратных скобках цифрой или заглавной буквой указано значение по умолчанию. Оно будет использовано, если оставить поле ввода пустым и нажать Enter.

      3. Подтвердите остановку сервисов. Шаги подтверждения и выбора режима остановки будут пропущены, если сервисы были остановлены вручную до запуска инсталлятора.

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

        Если компоненты Traffic Monitor функционируют на нескольких серверах, они должны быть остановлены в следующей последовательности:

        1. Перехватчики

        2. Индексер
        3. Веб-консоль
        4. База данных
      4. Выберите режим остановки Traffic Monitor:
        • Quick stop - быстрая остановка без обработки событий;

        • Waiting for stop - перед остановкой дождаться завершения текущей обработки событий;

        • Waiting for emptying file queues - перед остановкой дождаться обработки всех событий и очистки файловых очередей. Режим обработки всех событий и очистки файловых очередей доступен только на серверах c шаблоном Перехватчики. 

          Предупреждение
          titleВажно!

          Если компоненты перехвата и компоненты анализа (iw_cas, iw_pas) используются на разных серверах, остановка перехватчиков с очисткой файловых очередей может зависнуть. Рекомендуется использовать другие режимы или остановить компоненты вручную.

        Для выбора введите цифру, указанную напротив выбранного варианта, и нажмите Enter.

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

        Если выбран Quick stop, остановленные сервисы до запуска будут иметь статус failed (failed).

      5. Если выбран Quick stop или Waiting for stop, после возобновления работы Traffic Monitor необработанные события могут попасть в очередь ошибок обработки.
        Для продолжения введите Y и нажмите Enter.
        В процессе остановки на экране будет информация о ходе обработки событий.

      6. После остановки сервисов будет выведено сообщение о готовности начать обновление и запрос на продолжение.
        Для начала обновления введите Y и нажмите Enter.
        Начнется распаковка пакетов, обновление имеющихся и установка новых компонентов Traffic Monitor. Прогресс выполнения будет отображаться на экране.
        Процесс займет некоторое время.

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

        Если процесс установки был прерван по какой-либо причине, устраните ее и повторно запустите инсталлятор, чтобы продолжить установку с последнего успешно завершенного этапа.

      7. Перед завершением работы инсталлятор предложит удалить пакеты, созданные для обновления.
        Если обновление прошло успешно, данные рекомендуется удалить.

      8. После обновления инсталлятор предложит запустить остановленные сервисы.

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

        В случае некорректной настройки службы Consul в консоли будет выведено предупреждение:

        Для завершения работы инсталлятора нажмите Enter.

        При данной ошибке инсталлятор не запустит сервисы Traffic Monitor при завершении работы, их нужно будет запустить вручную после проверки, описанной в Шаге 3 данной инструкции.

        Предупреждение
        titleВажно!

        Перед запуском сервисов дождитесь завершения обновления на остальных серверах или завершайте работу инсталлятора без запуска сервисов и выполните запуск позже вручную.
        Сервисы должны быть запущены в строгой последовательности в зависимости от активированных на них шаблонов.

        Не запускайте сервисы Traffic Monitor до обновления и запуска сервера с шаблоном База данных.

        После обновления настройки системы мониторинга Nagios будут изменены на значения по умолчанию. Если до обновления конфигурационные файлы Nagios редактировались, в директории /etc/infowatch/nagios/iwmon будут созданы их копии с расширением .saved. Перед запуском сервисов Traffic Monitor перенесите настройки из файлов .saved в соответствующие новые конфигурационные файлы.

        После обновления для управления системой мониторинга используйте службу iwtm-nagios.
        Например, для просмотра статуса Nagios используйте команду:
        systemctl status iwtm-nagios

    • Раскрыть
      titleобновление с использованием графического режима инсталлятора

      В ОС оконная система X Window System использует клиент-серверную модель. Для запуска инсталлятора в графическом режиме используется перенаправление графического вывода удаленной подсистемы (X11 Forwarding). Это позволит работать напрямую с графическими приложениями среды Linux на компьютере, с которого осуществляется подключение к серверу. Данный режим реализуется с помощью SSH-подключения.

      Чтобы обновить Traffic Monitor с использованием графического режима инсталлятора, выполните следующие действия:

      1. На обновляемом сервере:
        1. Установите утилиту xauth с помощью команды:

          yum install xauth

        2. В конфигурационном файле /etc/ssh/sshd_config раскомментируйте строку "X11Forwarding yes". Для этого удалите перед строкой символ #.
        3. Сохраните изменения в конфигурационном файле.
        4. Перезапустите службу SSH с помощью команды:

          systemctl restart sshd

      2. На компьютере, на котором будет использован графический режим:

        1. Для подключения к обновляемому вам потребуется SSH-клиент с включенной опцией X11 Forwarding, например PuTTY.

        2. Для запуска инсталлятора в графическом режиме вам потребуется настроенное приложение-клиент для обращения к X Window System, например:
          • приложение Xming - для ОС семейства MS Windows;
          • оболочка Gnome 3 - для ОС семейства Linux.
      3. Запустите настроенное приложение-клиент для обращения к X Window System.
      4. Подключитесь к серверу, на котором планируется обновление Traffic Monitor, с помощью выбранного SSH-клиента.

        Раскрыть
        titleПример окна настройки PuTTY при подключении

      5. Запустите инсталлятор, выполнив следующую команду:

        ./iwtm-installer-x.x.x.xxx-rhel7

        В нашем примере команда будет следующей:

        ./iwtm-installer-7.57.0.125101-rhel7

        Начнется подготовка к запуску инсталлятора. На данном этапе не производится распаковка файлов.

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

        Перед запуском инсталлятора может быть выведено предупреждение о некорректном владельце файлов.

        Нажмите кнопку Yes, чтобы инсталлятор исправил владельца файлов и продолжил запуск.
        В противном случае нажмите кнопку No, исправьте несоответствие вручную или с помощью скрипта /tmp/iwtm_installer/scripts/check_iwtm.sh и повторно запустите инсталлятор.

        Предупреждение
        titleВажно!

        При отсутствии настроенных и доступных репозиториев ОС, запуск инсталлятора прервется со следующей ошибкой:

        При возникновении данной ошибки нажмите кнопку OK для закрытия окна и завершения работы инсталлятора, затем подключите стандартный репозиторий RHEL, репозиторий EPEL и повторно запустите инсталлятор.

        Подробную информацию об ошибке вы можете найти в лог-файлах, указанных в предупреждении.


        По завершении откроется окно приветствия вида:

        Для перехода к следующему окну используется кнопка Next, для возврата к предыдущему - Back. Для выхода из инсталлятора - кнопка Cancel.

      6. В следующем окне будут указаны доступные обновления для Traffic Monitor и СУБД.
        Image RemovedImage Added
        Для продолжения нажмите Next.

      7. Подтвердите остановку сервисов. Шаги подтверждения и выбора режима остановки будут пропущены, если сервисы были остановлены вручную до запуска инсталлятора.

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

        Если компоненты Traffic Monitor функционируют на нескольких серверах, они должны быть остановлены в следующей последовательности:

        1. Перехватчики

        2. Индексер
        3. Веб-консоль
        4. База данных
      8. Выберите режим остановки Traffic Monitor:

        • Quick stop - быстрая остановка без обработки событий;

        • Waiting for stop - перед остановкой дождаться завершения текущей обработки событий;

        • Waiting for emptying file queues - перед остановкой дождаться обработки всех событий и очистки файловых очередей. Режим обработки всех событий и очистки файловых очередей доступен только на серверах c шаблоном Перехватчики.

          Предупреждение
          titleВажно!

          Если компоненты перехвата и компоненты анализа (iw_cas, iw_pas) используются на разных серверах, остановка перехватчиков с очисткой файловых очередей может зависнуть. Рекомендуется использовать другие режимы или остановить компоненты вручную.

        Для выбора установите флажок напротив соответствующего значения и нажмите кнопку Next

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

        Если выбран Quick stop, остановленные сервисы до запуска будут иметь статус failed (failed).

      9. Если выбран Quick stop или Waiting for stop, после возобновления работы Traffic Monitor необработанные события могут попасть в очередь ошибок обработки.
        Для продолжения нажмите кнопку Yes.
        В процессе остановки на экране будет информация о ходе обработки событий.

      10. После остановки сервисов будет выведено сообщение о готовности начать установку и запрос на продолжение.


        Для начала обновления нажмите кнопку Next.
        Начнется распаковка пакетов, обновление имеющихся и установка новых компонентов Traffic Monitor. Прогресс выполнения будет отображаться на экране.

        Процесс займет некоторое время.

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

        Если процесс установки был прерван по какой-либо причине, устраните ее и повторно запустите инсталлятор, чтобы продолжить установку с последнего успешно завершенного этапа.

      11. После завершения обновления вы можете:

        • Remove exctracted installer data - удалить пакеты, созданные инсталлятором для установки. Если установка прошла успешно, данные рекомендуется удалить;

        • Start Infowatch Traffic Monitor services - запустить остановленные сервисы.

        Для выбора действий поставьте галочки напротив соответствующих пунктов.

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

        В случае некорректной настройки службы Consul в консоли будет выведено предупреждение:

        Для закрытия окна и завершения работы инсталлятора нажмите кнопку OK.

        При данной ошибке инсталлятор не запустит сервисы Traffic Monitor при завершении работы, их нужно будет запустить вручную после проверки, описанной в Шаге 3 данной инструкции.

        Предупреждение
        titleВажно!

        Перед запуском сервисов дождитесь завершения обновления на остальных серверах или завершайте работу инсталлятора без запуска сервисов и выполните запуск позже вручную.
        Сервисы должны быть запущены в строгой последовательности в зависимости от активированных на них шаблонов.

        Не запускайте сервисы Traffic Monitor до обновления и запуска сервера с шаблоном База данных.

        После обновления настройки системы мониторинга Nagios будут изменены на значения по умолчанию. Если до обновления конфигурационные файлы Nagios редактировались, в директории /etc/infowatch/nagios/iwmon будут созданы их копии с расширением .saved. Перед запуском сервисов Traffic Monitor перенесите настройки из файлов .saved в соответствующие новые конфигурационные файлы.

        После обновления для управления системой мониторинга используйте службу iwtm-nagios.
        Например, для просмотра статуса Nagios используйте команду:
        systemctl status iwtm-nagios

      12. Для завершения работы инсталлятора нажмите кнопку Next или дождитесь завершения обновления сервера СУБД.
    • Раскрыть
      titleобновление в тихом режиме

      Чтобы сократить участие в процессе обновления Системы, в инсталляторе предусмотрена работа тихом режиме. В этом режиме инсталлятор может обновить Traffic Monitor, используя параметры по умолчанию. 

      В инсталляторе реализована возможность использования файла параметров (option file). В нем вы можете задать требуемые особенности установки. При запуске инсталлятора с файлом параметров, указанные в нем значения будут считаться параметрами по умолчанию.

      Файл параметров (option file)

      В файле описание параметров имеет вид:

      <имя_параметра>=<значение_параметра>

      Допускается оставлять комментарии, используя символ #.

      Блок кода
      languagec#
      titleПример файла параметров:
      # This file is just an example
      fix_incorrect_file_owners=1
      cleanup_way=clean_fq
      start_services_after_upgrade=1

      В данном примере указаны параметры:

      • исправить некорректного владельца файлов;
      • перед остановкой сервисов дождаться обработки всех событий и очистки файловых очередей;
      • после обновления запустить сервисы.
      Предупреждение
      titleВажно!

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

      Чтобы использовать файл параметров, перейдите в директорию с инсталлятором и запустите его с опцией --optionfile и с указанием созданного ранее файла.

      Блок кода
      languagec#
      titleПример команды использования файла параметров:
      ./iwtm-installer-7.57.0.125101-rhel7 --optionfile /some_directory/option-file-example

      Альтернативный способ использования: назовите файл параметров тем же именем, что назван инсталлятор, но с расширением .options, и скопируйте его в директорию к инсталлятору. В этом случае при запуске инсталлятор так же будет считать параметры из файла значениями по умолчанию.

      Тихий режим обновления

      Для обновления в тихом режиме используйте опцию --mode unattended.

      Уровень взаимодействия с пользователем задается параметром --unattendedmodeui, который имеет следующие значения:

      • none - в процессе работы инсталлятор не выводит на экран никакую информацию и не требует взаимодействия с пользователем;
      • minimal - отображает прогресс обновления, не требует взаимодействия с пользователем;
      • minimalWithDialogs - отображает прогресс обновления, также в процессе могут появляться всплывающие окна, может потребоваться взаимодействие с пользователем.
      Блок кода
      languagec#
      titleПример команды запуска инсталлятора в тихом режиме без участия пользователя и с файлом параметров:
      ./iwtm-installer-7.57.0.125101-rhel7 --optionfile /some_directory/option-file-example --mode unattended --unattendedmodeui minimal
      Предупреждение
      titleВажно!

      При отсутствии настроенных и доступных репозиториев ОС, запуск инсталлятора прервется со следующей ошибкой:

      При возникновении данной ошибки нажмите Enter для завершения работы инсталлятора, затем подключите стандартный репозиторий RHEL, репозиторий EPEL и повторно запустите инсталлятор.

      Подробную информацию об ошибке вы можете найти в лог-файлах, указанных в предупреждении.

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

      Если процесс установки был прерван по какой-либо причине, устраните ее и повторно запустите инсталлятор, чтобы продолжить установку с последнего успешно завершенного этапа.
      Когда процесс завершится без ошибок, инсталлятор удалит пакеты, созданные для установки.

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

      В случае некорректной настройки службы Consul в консоли будет выведено предупреждение:

      Для завершения работы инсталлятора нажмите Enter.

      При данной ошибке инсталлятор не запустит сервисы Traffic Monitor при завершении работы, их нужно будет запустить вручную после проверки, описанной в Шаге 3 данной инструкции.

      Полный состав файла параметров

      В таблице приведен полный список возможных параметров для обновления и их значения по умолчанию.

      Scroll Table Layout
      widths20%, 17%, 13%, 20%, 30%

      НазваниеЗначение по умолчаниюДопустимые значенияОписаниеПримечание

      force_upgrade

      00,1Принудительно переключает инсталлятор в режим обновления, даже если совпадают версии

      fix_incorrect_file_owners

      00,1Параметр определяет, должен ли инсталлятор по умолчанию исправить некорректного владельца файлов перед обновлением.Если у обновляемых файлов будет некорректный владелец, инсталлятор прервет обновление.

      cleanup_way

      wait_stopquick_stop, wait_stop, clean_fqВыбор режим остановки сервисов:
      • quick_stop - быстрая остановка без обработки событий;

      • wait_stop - перед остановкой дождаться завершения текущей обработки событий;

      • clean_fq - перед остановкой дождаться обработки всех событий и очистки файловых очередей.

      Если компоненты Traffic Monitor функционируют на нескольких серверах, они должны быть остановлены в следующей последовательности:

      1. Перехватчики

      2. Индексер
      3. Веб-консоль
      4. База данных

      Режим обработки всех событий и очистки файловых очередей (clean_fq) доступен только на серверах c шаблоном Перехватчики. Если был указан этот режим, но на сервере отсутствуют компоненты перехвата, будет использован режим текущей обработки событий (wait_stop). Если компоненты перехвата и компоненты анализа (iw_cas, iw_pas) используются на разных серверах, остановка перехватчиков с очисткой файловых очередей может зависнуть. Рекомендуется использовать другие режимы или остановить компоненты вручную.

      start_services_after_upgrade

      10,1Параметр определяет, должен ли инсталлятор запустить ли сервисы после обновления.

      Не запускайте сервисы Traffic Monitor до обновления и запуска сервера с шаблоном База данных.

      После обновления настройки системы мониторинга Nagios будут изменены на значения по умолчанию. Если до обновления конфигурационные файлы Nagios редактировались, в директории /etc/infowatch/nagios/iwmon будут созданы их копии с расширением .saved. Перед запуском сервисов Traffic Monitor перенесите настройки из файлов .saved в соответствующие новые конфигурационные файлы. После обновления для управления системой мониторинга используйте службу iwtm-nagios.
      Например, для просмотра статуса Nagios используйте команду:
      systemctl status iwtm-nagios

      Если компоненты Traffic Monitor функционируют на нескольких серверах, они должны быть запущены в следующей последовательности:

      1. База данных

      2. Веб-консоль
      3. Индексер
      4. Перехватчики
  • Введите команду для поиска и вывода на экран консоли списка файлов с расширением .rpmnew:

    find / -name "*rpmnew*" -print
    Если такие файлы найдены, их необходимо корректно объединить с конфигурационными файлами (см. статью "Объединение конфигурационных файлов").

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

    Для успешного объединения конфигурационных файлов рекомендуется ознакомиться со статьями на официальном сайте (доступны на английском языке):

    Предупреждение
    titleВажно!

    В процессе обновления не вносите изменения в файлы database.conf, consul.json.

    На сервере с щаблоном шаблоном Веб-консоль после объединения в конфигурационном файле web.conf в блоке search_meta в параметре hostname укажите IP-адрес сервера СУБД).

  • На серверах с шаблоном Перехватчики в директории /opt/iw/tm5/etc/scripts/ должен быть файл iwssid.lua , его рекомендуется оставить без изменений, если до обновления он не редактировался.
    В противном случае его необходимо корректно объединить с конфигурационным файлом iwssid.lua.rpmnew (см. статью "Объединение конфигурационных файлов").

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

    Все настройки для работы Системы "в разрыв" перенесены в конфигурационный файл luaengined.conf.

  • Проверьте кластер службы Consul - описание смотрите ниже.
  • Якорь
    7.2 Шаг 2
    7.2 Шаг 2
    ШАГ 2. ПРОВЕРКА КЛАСТЕРА СЛУЖБЫ CONSUL

    Для проверки кластера Consul выполните следующие действия:

    1. На всех обновляемых серверах запустите службу Consul, выполнив команду:
      systemctl start iwtm-consul
      Проверить статус службы можно командой:
      systemctl status iwtm-consul
    2. Чтобы проверить службу Consul, на сервере с шаблонов База данных выполните команды:
      1. Для вывода IP-адреса основного сервера (лидера) кластера:
        curl --noproxy 127.0.0.1 http://127.0.0.1:8500/v1/status/leader ; echo
      2. Для вывода информации о членах кластера:
        consul members
    3. Если не будет выведен IP-адрес лидера кластера, или не все серверы будут в списке членов кластера, выполните конфигурирование кластера службы Consul.
      После настройки повторите проверку (действие 2).
    4. Выполните проверку работоспособности внутренних сервисов Системы - описание смотрите ниже.

    Якорь
    7.2 Шаг 3
    7.2 Шаг 3
    ШАГ 3. ПРОВЕРКА РАБОТОСПОСОБНОСТИ ВНУТРЕННИХ СЕРВИСОВ СИСТЕМЫ

    На сервере с шаблоном Веб-консоль запустите службы iw_bookworm, iw_licensed, iw_updater, iw_kicker и выполните проверку их работоспособности:

    1. Выполните команду для запуска службы iw_bookworm:
      iwtm start bookworm
    2. Службе может потребоваться время на включение. Для проверки состояния службы введите команду:
      curl -s http://localhost:8500/v1/health/checks/iw-bookworm | python -mjson.tool
      В результате выполнения команды будет выведена информация об указанной службе:

    3. Проверьте значения блоков "Node" и "Status":
      1. В блоке "Node" должно быть указано имя ноды в кластере Consul, на которой установлена проверяемая служба;
      2. В блоке "Status" должно быть указано "passing".
    4. Служба iw_licensed должна быть запущена в единственном экземпляре на кластер. Выполните команду для запуска службы iw_licensed:
      iwtm start licensed
    5. Службе может потребоваться время на включение. Для проверки состояния службы iw_licensed введите команду:
      curl -s http://localhost:8500/v1/health/checks/iw-licensed | python -mjson.tool
      Выполните действие 3 текущего шага.
    6. Выполните команду для запуска службы iw_updater:
      iwtm start updater
    7. Службе может потребоваться время на включение. Для проверки состояния службы iw_updater введите команду:
      curl -s http://localhost:8500/v1/health/checks/iw-updater | python -mjson.tool
      Выполните действие 3 текущего шага.
    8. Для проверки службы iw_kicker необходимо запустить службу iw_blackboard:
      iwtm start blackboard
    9. Служба iw_kicker должна быть запущена в единственном экземпляре на кластер. Выполните команду для запуска службы iw_kicker:
      iwtm start kicker
    10. Службе может потребоваться время на включение. Для проверки состояния службы iw_kicker необходимо проверить файл /opt/iw/tm5/log/web-console-error.log на наличие ошибок в процессе обновления. Введите команду:
      grep -r 'error' /opt/iw/tm5/log/web-console-error.log || echo "All good"
      Убедитесь, что адрес в команде указан верно. В случае отсутствия ошибок будет выведено сообщение All good.
    11. Выполните команду для остановки служб:
      iwtm stop
    12. Завершите обновление серверов - описание смотрите ниже. 

      Предупреждение
      titleВажно!

      Если служба не запустилась успешно, проверьте соответствующий лог-файл на наличие ошибок в процессе обновления и обратитесь в службу технической поддержки компании InfoWatch по адресу support@infowatch.com.
      Вы также можете посетить раздел технической поддержки на нашем сайте:

      www.infowatch.ru/services/support.

      Лог-файлы служб для проверки:

      • /opt/iw/tm5/log/bookworm.log - для службы iw_bookworm
      • /opt/iw/tm5/log/updater.log - для службы iw_updater
      • /opt/iw/tm5/log/licserv.log - для службы iw_licensed
      • /opt/iw/tm5/log/web-console-error.log - для службы iw_kicker

      Лог-файлы служб рекомендуется проверить и в случае успешного запуска служб, чтобы исключить возникновение ошибок.
      Рекомендованный уровень логирования для проверки - не ниже INFO. Лог-файл может отсутствовать, если не было записей об ошибках.

    Якорь
    7.2 Шаг 4
    7.2 Шаг 4
    ШАГ 4. ЗАВЕРШЕНИЕ ОБНОВЛЕНИЯ СЕРВЕРОВ

    Чтобы завершить обновление серверов, на каждом из них выполните следующие действия:

    1. Если ранее работа инсталлятора не была завершена, выберите запуск сервисов и завершите обновление.
      Если ранее инсталлятор завершил работу без запуска сервисов, запустите их вручную или перезагрузите сервер для запуска всех остановленных сервисов.
      Команда для перезагрузки сервера:
      reboot

      Предупреждение
      titleВажно!

      Компоненты Traffic Monitor должны быть запущены в следующей последовательности:

      1. База данных

      2. Веб-консоль
      3. Индексер
      4. Перехватчики
      Предупреждение
      titleВажно!

      После запуска Traffic Monitor подключается к базе данных и загружает оттуда файл конфигурации cas_config.xml. В зависимости от объема конфигурации загрузка файла может занять некоторое время.
      В это время Система может записывать сообщения об ошибках в лог-файлы:

      • Раскрыть
        title/opt/iw/tm5/log/cas_config_compiler.log
        Блок кода
        languagejs
        titleЗапись об ошибке вида
        linenumberstrue
        1 2019-10-07 17:00:57.351489 (3936:0x00007f4008de8880) [ERROR  ] : <Root> Exception:.
        Diagnostic information..
        /sandbox/src/cas3/config/details/cas_factory.cpp(233): Throw in function bool cas::CasConfigFactory::LoadXmlConfig(cas::ConfigCreator::Ptr&, const boost::filesystem::path&) const
        Dynamic exception type: boost::exception_detail::clone_impl<cas::ExceptionCasConfig>
      • Раскрыть
        title/opt/iw/tm5/log/cas.log
        Блок кода
        languagejs
        titleЗапись об ошибке вида
        linenumberstrue
        1 2019-10-03 17:39:13.348146 (14262:0x00007fe83892ba80) [WARNING] : <Root> Prometheus server is off, therefore the statistics is unavailable. That's what you wanted, isn't it?
        2 2019-10-03 17:39:14.364655 (14262:0x00007fe83892ba80) [ERROR  ] : <Root> Error when loading config of tech: Cannot open xml file with cas configuration: etc/config/cas/cas_config.xml
        3 2019-10-03 17:39:14.364856 (14262:0x00007fe83892ba80) [ERROR  ] : <Root> failed to initialize thrift server
        Diagnostic information.
        /sandbox/src/cas3/handler.cpp(682): Throw in function cas::Handler::LoadedConfigData cas::Handler::GetLoadedConfigData(const prop::Property&, const Ptr&)
        Dynamic exception type: boost::exception_detail::clone_impl<tech::ExceptionTechLoadConfig>
        std::exception::what: Cannot open xml file with cas configuration: etc/config/cas/cas_config.xml

      После успешной загрузки файла конфигурации cas_config.xml Система прекратит запись сообщений об ошибках и заработает в штатном режиме.

      Если в течение длительного времени Система продолжает запись об ошибках, проверьте соединение с базой данных.

    2. В Traffic Monitor 7.6 расширен список задач по умолчанию для автоматического удаления ненужных файлов.
      Задачи для планировщика cron теперь по умолчанию указаны в файле /etc/cron.d/iwtm_cleanup (о содержимом файла см. "Автоматическое удаление ненужных файлов в Traffic Monitor").
      Для корректной работы новых задач:
      1. Удалите старые задачи, отредактировав файл конфигурации cron:
        sudo crontab -e
      2. Cохраните изменения и выйдите из редактора файла конфигурации.
      3. Перезапустите сервис:
        systemctl reload crond
    3. Если до обновления вы не редактировали прошлый файл с задачами /etc/cron.d/iwtm_error_queue, пропустите данное действие. 
      В противном случае /etc/cron.d/iwtm_error_queue будет удален, а его содержимое сохранено в файле /etc/cron.d/iwtm_error_queue.rpmsave.
      Чтобы задачи, добавленные вами ранее, снова работали, создайте файл для ваших задач в директории /etc/cron.d/ и скопируйте в него нужные задачи из /etc/cron.d/iwtm_error_queue.rpmsave.

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

      Вы можете добавить свои задачи в файл /etc/cron.d/iwtm_cleanup, но тогда при следующем обновлении он будет переименован в /etc/cron.d/iwtm_cleanup.rpmnew и заменен файлом с содержимым по умолчанию. После следующего обновления необходимо будет перенести добавленные вами задачи из /etc/cron.d/iwtm_cleanup.rpmnew в новый /etc/cron.d/iwtm_cleanup.
      Чтобы каждый раз не переносить ваши задачи, вы можете создать отдельный файл с вашими задачами в директории /etc/cron.d/.


    4. Если у вас установлена система Prometheus и если сервер с шаблоном База данных не был перезагружен, для запуска службы выполните на нем команду:

      systemctl start iwtm-postgres_exporter - для СУБД PostgreSQL
      systemctl start iwtm-oracledb_exporter - для СУБД Oracle

    5. На сервере с шаблоном Веб-консоль введите команду для очистки кеша:

      redis-cli flushall

    6. Введите команду для очистки кеша менеджера пакетов:
      yum clean all

    7. Введите команду для проверки статусов процессов:
      iwtm status 
      На экране отобразится список процессов и их статусы.

    Обновление серверов Traffic Monitor распределенного типа установки завершено. Номер версии Системы в окне О системе Консоли управления Traffic Monitor должен измениться на новый. Если в Системе есть другие серверы или подсистемы, подлежащие обновлению, воспользуйтесь инструкциями данного раздела.

    Предупреждение
    titleВажно!

    Если в Системе настроены автоматические синхронизации с LDAP-серверами, для гарантированной загрузки сущностей после обновления выполните синхронизации вручную (см. "Infowatch Traffic Monitor. Руководство пользователя", статья "Запуск синхронизации с сервером вручную").

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

    Для корректного отображения Консоли управления до начала работ удалите кеш в вашем браузере. Данное действие выполняется стандартными средствами браузера.

    Раскрыть
    titleОбновление Системы путем чистой установки и восстановления данных из резервной копии (для СУБД PostgreSQL)

    Якорь
    Backup_Update
    Backup_Update

    Предупреждение
    titleВажно!

    Крайне рекомендуется выполнить резервное копирование Системы, а также клонировать ее и провести обновление на этой тестовой машине.
    Если вы планируете не копировать данные, а примонтировать диск или раздел с данными, все равно рекомендуется выполнить их резервное копирование.
    После чистой установки Системы конфигурационные файлы Traffic Monitor необходимо будет настроить заново. Рекомендуется сохранить их для повторной настройки после обновления.


    1. На всех серверах для остановки сервисов Traffic Monitor введите команду:
      iwtm stop
    2. На сервере с компонентами Веб-консоли остановите службу командой:
      systemctl stop iwtm-php-fpm
    3. На сервере с шаблоном База данных подключитесь к базе данных и проверьте количество содержащихся в ней событий:
      1. Чтобы подключиться к серверу БД, из консоли введите команды:
        su - iwtm
        psql postgres iwtm -p 5433

      2. Далее введите команду:
        select count(1) from object;
      3. Для выхода введите команду:
        \q

      4. Введите команду:
        exit

    4. Выполните резервное копирование БД, индексов, конфигурации службы iw_adlibitum.
    5. Установите новую версию Traffic Monitor.

      Предупреждение
      titleВажно!

      Если резервные копии Базы данных находятся на внешних хранилищах, не подключайте их в процессе установки. Это нужно будет сделать непосредственно перед восстановлением и обновлением Базы данных.

      По завершении установки не удаляйте пакеты созданные инсталлятором в процессе (пункт Remove extracted installer data).

    6. На всех серверах для остановки служб введите команды:
      iwtm stop
      systemctl stop iwtm-nagios
    7. На сервере с шаблоном Веб-консоль остановите службу командой:
      systemctl stop iwtm-php-fpm
    8. На сервере с шаблоном База данных:

      1. Введите команду для остановки службы:
        systemctl stop postgresql-13

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

        Чтобы иметь возможность восстановить исходное состояние чистой установки, вы можете скопировать директории u01 и u02.

      2. Для изменения прав доступа к директории введите команду:
        chmod 777 /var/log/infowatch/update
      3. Скопируйте резервную копию Базы данных таким образом, чтобы расположение и права соответствовали исходным.
      4. Перейдите в директорию u01 с помощью команды:
        cd /u01
      5. Для изменения владельца директорий используйте команду:
        chown -R postgres:postgres postgres
      6. Перейдите в директорию u02 с помощью команды:
        cd /u02
      7. Для изменения владельца директорий используйте команды:
        chown -R postgres:postgres arch
        chown -R postgres:postgres pgdata
        chown -R postgres:postgres pgdata1

      8. Введите команду для перехода в директорию со скриптами:
        /tmp/iwtm_installer/scripts
      9. Находясь в директории, запустите скрипт обновления СУБД с помощью команды вида:
        ./install_postgres.sh --distrib_path=<директория_с_дистрибутивом_СУБД> --tm_version=<версия_нового_Traffic_Monitor> --update
        В нашем примере:
        ./install_postgres.sh --distrib_path=/root --tm_version=7.57.0.125101 --update

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

        В примере дистрибутив iwtm-postgresql-13.8-x.x.x.xxx-rhel7.tar.gz расположен в директории /root.
        Чтобы узнать версию установленного Traffic Monitor, введите команду:
        cat /opt/iw/tm5/version

      10. После успешного обновления выполните команду для проверки статус службы СУБД:
        systemctl status postgresql-13
      11. Запустите скрипт обновления схемы данных с помощью команды вида:
        ./install_dbschema.sh --tm_version=<версия_нового_Traffic_Monitor> --db_type=postgres --update
        В нашем примере:
        ./install_dbschema.sh --tm_version=<7.57.0.125101 --db_type=postgres --update
      12. Выполните действие 3 данной инструкции, чтобы сравнить количество событий в Базе данных до и после обновления.
    9. На сервере с шаблоном Индексер скопируйте резервные копии индексов таким образом, чтобы расположение и права соответствовали исходным.
    10. На сервере с шаблоном Веб-консоль скопируйте резервную копию конфигурации службы iw_adlibitum таким образом, чтобы расположение и права соответствовали исходным.
    11. Если исходное расположение индексов и конфигурации службы iw_adlibitum не являлось расположением по умолчанию, его необходимо будет указать в соответствующих разделах конфигурационных файлов (см. инструкцию по созданию резервных копий).
    12. На сервер с шаблоном Веб-консоль выполните команды:

      sudo -u iwtm touch /opt/iw/tm5/www/backend/protected/runtime/first_run
      iwtm restart kicker

    13. Введите команду для перезагрузки сервера:
      reboot

      Предупреждение
      titleВажно!

      Компоненты Traffic Monitor должны быть запущены в следующей последовательности:

      1. База данных

      2. Веб-консоль
      3. Индексер
      4. Перехватчики
    14. Введите команду для очистки кеша:

      redis-cli flushall
    15. Введите команду для проверки статусов процессов:
      iwtm status 
      На экране отобразится список процессов и их статусы.

    Обновление серверов Traffic Monitor распределенного типа установки завершено. Номер версии Системы в окне О системе Консоли управления Traffic Monitor должен измениться на новый. Если в Системе есть другие серверы или подсистемы, подлежащие обновлению, воспользуйтесь инструкциями данного раздела.

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

    Для корректного отображения Консоли управления до начала работ удалите кеш в вашем браузере. Данное действие выполняется стандартными средствами браузера.

    Sv translation
    languageen
    Предупреждение
    titleWarning!

    Before updating the Traffic Monitor server, we recommend updating the DM server first.

    Versions before 7.2 contained two types of servers:

    • TM server (TME Node Server installation type), which is in accordance to current Web console and Interceptors templates;
    • DBMS server (TME DB Server), which is is in accordance to current Database and Indexer templates.

    Traffic Monitor installation kit starting from version 7.2 contains installation templates. Each template - is a set of components to be activated after the System is deployed. For more details please see "Схемы развертывания Системы и выбор типа установки".

    There are four templates available to install:

    • Database;
    • Indexer service;
    • Web console;
    • Traffic interceptors.

    All servers are to be updated, where Traffic Monitor components are installed.

    The Traffic Monitor installer can work in two modes involving user to update the System:

    • text mode in server console;
    • graphical mode.

    The updating steps and its sequence is similar in both modes.

    Silent mode is also available to reduce user's role.

    Regardless the selected mode of update, the Management console or server terminal is required to update the System.

    During the update all the Traffic Monitor packages will be delivered, but after update is over the installer will start only the services which were not disabled before the update.

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

    In case the service was disabled, it will not be started after updating.

    In case the service was stopped, it will be started after updating.

    New services statuses will comply with statuses of initial installation.

    The packages unpack will start not when the installer will be started, but directly before the updating. 

    Предупреждение
    titleWarning!

    Each server should have a unique correct FQDN.

    Before updating the System, perform the following steps:

    1. Open the console of the server being updated:
      • in the case of a physical server - the console is displayed on the screen of a monitor connected to the server;
      • in the case of a virtual server - run the Launch Virtual Machine Console command (see an example below).
         A window with the server console will open.
    2. To log into the System, enter login and password (you should enter as a root user).

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

      The commands within the console are entered from the keyboard and must be confirmed by pressing Enter. So, if the instruction tells you to enter the command, it means that you should enter the command and then press  Enter. Once the command is executed, the invitation is displayed again - it is ended with # or $ (depending on the user who logged in). Before typing the next command, make sure that an invitation is displayed at the command line.

      If you connect remotely via SSH, we recommend using the Screen utility. Thus you can avoid problems in case of a lost connection with the server being updated. When disconnecting from the utility, all the processes started are not to be interrupted and you may safely continue the System update.

      Warning! Using Screen is highly recommended when working with DB and updating DBMS.

      Basic commands:

      • screen - start the utility;
      • Ctrl+a d - disconnect from the screen (to be input within the screen window);
      • screen -ls - display the list of screen running;
      • screen -r - connect to the screen again;
      • screen -r name - connect to a specific screen with «name»;
      • exit - exit screen (to be input within the screen window).
    3. Enter the command to call the file manager:
      mc 

      The screen will display a window of Midnight Commander file manager where you can view files.
      You can navigate in the file manager using keyboard arrows and the Enter key or with a mouse. Besides, you can enter commands at the command line which is displayed in the lower part of the screen (for entering commands, no additional actions are required).

      To go up one level, position the cursor in the /.. field (the first line in the file manager) and press Enter.

    4. Depending on Traffic Monitor version you have to update the following actions may vary. Thus, check the version and installation of server to be updated: 

      Блок кода
      languagetext
      titleExample of content
      {
        "product_type": "tme",
        "version": "7.45.10.130131",
        "all_in_one": false,
        "templates": {
          "db": {
            "local": true
          },
          "indexer": {},
        }
      }

      Record from the example corresponds to server of Traffic Monitor Enterprise version 7.45.10.130 131 distributed installation. In the example Database and Indexer templates are activated. Local database is used.

    5. To exit the file manager (it is necessary for better commands executing) enter the command: 
      exit
    Предупреждение
    titleWarning!

    Before running the installation make sure that the server complies with the OS and network settings requirements.

    After update is complete the systemd unit file parameters will return to default values.

    Примечание
    titleAttention!

    Якорь
    Backup
    Backup
    In case an error occurs and you need to restore your database and restart the update from the last successfully completed step, we recommend to perform the following actions: 

    1. Раскрыть
      titleDatabase and indexes backup
      Предупреждение
      titleWarning!

      To back up successfully, you should copy the files with their rights, users and groups saved.

      To do this, copy files into the Linux file system only (ex., Ext4 or XFS).

      Store backup copies either on a separate section of the server or on another server or on an external device. Make sure that the data will not be lost.

      Backup copies should be copied into their original directories, and rights, users and groups should not be changed.

      1. On all servers stop TM services:
        iwtm stop 
      2. On server with web console:
        1. Enter the command
          systemctl stop iwtm-php-fpm
           
        2. Create the backup of iw_adlibitum service. For this:
          1. Go to /opt/iw/tm5/etc and open the file adlibitum.conf to view.
          2. In "ConfigDir" parameter you can see a relative path to the directory where the configuration of iw_adlibitum service is. The path is specified in relation to the content of "NookDir" parameter.
            Copy the directory to a separate section of server or to another server or to an external device. 

      3. On server with Indexer:
        1. Enter the command to stop the service iw_indexer: 
          iwtm stop indexer
        2. Create the indexer backup copy:
          1. Go to /opt/iw/tm5/etc and open the file indexer.conf to view.

          2. In "SphinxBaseDir" parameter you can see a relative path to the directory where the indexes are. In "ArchiveDir" parameter you can see a relative path to the indexers archive. The path is specified in relation to the content of "NookDir" parameter. Copy the directories to a separate section of server or to another server or to an external device. 

      4. On DBMS server:

        1. Depending on the DBMS you use and the version of Traffic Monitor, enter tha command to stop the database:
          • for DBMS Oracle
            systemctl stop oracle
          • for DBMS PostgreSQL 
            systemctl stop postgresql-13

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

      To specify the directories that contain the database, check the file content:

      • /opt/iw/tm5/csw/oracle/database.conf (forOracle DBMS)

      • /opt/iw/tm5/csw/postgres/database.conf (for PostgreSQL DBMS)

      Create your database backup. By default, the database is stored in the directories /u01, /u02 etc.
      Store the database backup copies either on a separate section of the server or on another server or on an external device. 

                        ii. Create a backup copy of indexes. To do this:

          1. Go to /opt/iw/tm5/etc directory and open to view indexer.conf file.

          2. "SphinxBaseDir" parameter contains a path to directory with indexes. "ArchiveDir" parameter contains a path to indexes archive. Path to archives is specified according to "NookDir" parameter content.
            Copy the directories with indexes and indexes archives to different section or to external device.

    2. Раскрыть
      titleBackup configuration of environment

      You are required to consider the specifics of backing up from the Warning note in the previous step. Go to these addresses and copy the files:

      • Раскрыть
        titleFor Oracle DBMS:
        • /opt/iw/tm5/etc/oracle.conf
        • /etc/default/iwtm
        • /etc/profile.d/iw-oracle-env.sh
        • /etc/logrotate.d/iwtm-oracle-conf-server
        • /opt/iw/tm5/etc/iw-oracle_client.sh
        • /opt/iw/tm5/etc/iw-oracle_server.sh
      • Раскрыть
        titleFor PostgreSQL DBMS:
        • /etc/default/iwtm
        • /etc/profile.d/iw-postgresql-env.sh
        • /etc/profile.d/iw-postgresql-client-env.sh
        • /etc/sudoers.d/iw-pgagent
        • /etc/pgagent/pgagent-13.conf
        • /opt/iw/tm5/etc/postgresql/ - all files in the directory
        • /opt/iw/tm5/etc/postgres.conf
      Информация
      titleNote:

      Also the installer makes copies of environment configuration file in  /tmp/iwtm_db_configs_backup directory. For user comport the installer recreates in directory the paths of original files which can be used to copy back to initial state. Copies created by installed are stored untill successfull upgrade is complete. Once completed these copies are to be removed.

    Depending on the version installed, choose the instruction:

    Раскрыть
    titleUpdating the System over the installed one

    Якорь
    7.2
    7.2

    Предупреждение
    titleWarning!

    We strongly recommend backing up the System, cloning it, and updating on this particular testing machine.

     You should stop the services using the installer and run the update in the following order:

    1. Interceptors
    2. Indexer
    3. Web console
    4. Database

    The updating order is as follows:

    Step 1. Updating All Servers

    Step 2. Checking Consul Cluster

    Step 3. Performing Healthcheck of System Internal Services

    Step 4. Completing Servers Update

    Якорь
    7.2 Step 1
    7.2 Step 1
    STEP 1. UPDATING ALL SERVERS

    To update servers, please take the following actions as per each server:

    1. Copy the following files which are a part of InfoWatch Traffic Monitor distribution kit to /root directory:

      • iwtm-installer-x.x.x.xxx-rhel7.run run - for upgrade on Red Hat Enterprise Linux or Oracle Linux (where x.x.x.xxx is the build number)
      • iwtm-postgresql-13.8-x.x.x.xxx.tar.gz - if you use PostgreSQL DBMS;
      • iwtm-oracle-19.0.0.0.0-x.x.x.xxx.tar.gz - if you use Oracle DBMS.

      As per our example: 

      • iwtm-installer-7.57.0.125101-rhel7 - for upgrade on Red Hat Enterprise Linux or Oracle Linux;
      • iwtm-postgresql-13.8-7.57.0.125101.tar.gz - if you use PostgreSQL DBMS;
      • iwtm-oracle-19.0.0.0.0-7.

        5

        7.0.

        125

        101.tar.gz

         

        - if you use Oracle DBMS.

        Предупреждение
        titleWarning!

        The following instruction describes installation using installer for Red Hat Enterprise Linux.
        It is also valid for Oracle Linux.

    2. To make the file iwtm-installer-x.x.x.xxx-rhel7 executable, enter the command:
      chmod u+x /root/iwtm-installer-x.x.x.xxx-rhel7

      Our example command:
      chmod u+x /root/iwtm-installer-7.57.0.125101-rhel7

    3. Connect external or local Red Hat Enterprise Linux 7 OS repositories. You
      For example, you can find instructions on how to configure local
      repository at the  Red Hat Enterprise Linux repository at the official web page. 
    4. To update packages, enter:
      yum upgrade

      The following request will be displayed:

      To continue, type Y and then press Enter.

    5. If you have the Prometheus system installed to stop the service on the server with Database template you should run the following command:

      systemctl stop iwtm-postgres_exporter - for PostgreSQL DBMS
      systemctl stop iwtm-oracledb_exporter - 
      for Oracle DBMS

    6. On the server with Database template before running the installer you are recommended to start database service in case it was stopped earlier. Depending on the DBMS you are using, enter one of the commands: 

      • service oracle start (for DBMS Oracle)
      • service postgresql-13 start (for DBMS PostgreSQL)
    7. Enter the command to go to Traffic Monitor distribution kit directory:

      cd /root

    8. Automatic merging of Traffic Monitor configuration files of the old and new versions is implemented in the installer.

      Предупреждение
      titleWarning!

      Automatic merging applies only to Traffic Monitor configuration files with the .conf extension that are located in the /opt/iw/tm5/etc directory.
      Before merging, backup copies for source configuration files are created in the /opt/iw/tm5/etc_conf_backup_<date_time> directory. An example of the directory name: /opt/iw/tm5/etc_conf_backup_11.12.20222023_09:26:33.
      After merging, files with the.rpmnew extension, which relate to merged configuration files, will be deleted.
      All steps will be logged in the /var/log/infowatch/iwtm-install-<version>-<date>_<time>.log file. An example of the log file name: /var/log/iwtm-install-7.57.0.125101-20222023-11-19_09-56-25.log.
      You can also find information on the merge process in the /var/log/infowatch/config_merge/ directory.
      If during operations with a configuration file, some errors occur, the process is not stopped and other files are merged. Records concerning the errors will be added to the log file

      Run the installer using one of the modes:

      Раскрыть
      titleUpdating in text mode using server console

      To update Traffic Monitor using server console:

      1. Start the Traffic Monitor installer running the command:

        ./iwtm-installer-x.x.x.xxx-rhel7

         Our example command:

        ./iwtm-installer-7.57.0.125101-rhel7

        The installer will prepare to run. At this step, files are not unpacked.

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

        Before the installer is started, you may see a warning that the file owner is wrong.

        Type Y and press Enter for the installer to change the file owner and continue running.

        Otherwise, you can enter N and press Enter, then edit the file owner manually or using the /tmp/iwtm_installer/scripts/check_iwtm.sh  script and start the installer again.

        Предупреждение
        titleWarning!

        If available configured OS repositories are missing, the preparation process will stop with the following error message:

        To fix this error press Enter to exit, connect the standard RHEL OS repository, EPEL repository and and restart the installer.

        For more details on the error refer to the log files specified in the error message.

        After this finished, a welcoming window will be displayed:

        Image RemovedImage Added
        This will contain all available updates for Traffic Monitor and DBMS.

      2. To continue, type Y and press Enter. To exit the installer type N and press Enter.

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

        When updating via server console you can see the default value which is specified in square brackets as a figure or a capital letter next to input field. This value will be used in case of leaving the field empty and pressing Enter

      3. Confirm the Traffic Monitor services and database were stopped. Steps to confirm the stop and to select a mode will be missed in case the services were stopped manually before starting the installer.

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

        If components of Traffic Monitor are operating on several servers, then you should stop them one after another in the following order:

        1. Interceptors
        2. Indexer
        3. Web console
        4. Database
      4. Select a mode to stop Traffic Monitor:

        • Quick stop - quick stop without events processing;

        • Waiting for stop - wait till the current processing of events is finished;

        • Waiting for emptying file queues - wait till all the events are processed and all the file queues are empty before stopping. The mode is available only on servers with interception components.

          Предупреждение
          titleWarning!

          If interception and analysis components iw_cas, iw_pas are used on separate servers, then stopping interceptors and cleaning up file queues may be pending.

          We recommend to select a different mode or to stop the components manually. 

          To make a choice please enter the figure specified next to option selected, and press Enter.

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

          In case Quick stop is selected, the stopped services will have failed status before the update.

      5. If you've selected  Quick stop or Waiting for stop, events can be sent to error queue after Traffic Monitor resumes the work.

        To continue type Y and press Enter.

        While stopping an events processing progress will be displayed.

      6. After the services are stopped, a message to start the updating and query to continue will be displayed.
        To continue type Y and press Enter. 

        The unpacking of Traffic Monitor updating files will start. Implementation progress will be displayed.


        The process may take some time.

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

        If for any reason the installation process was interrupted, eliminate the cause and restart the installer. The installation will continue from the last step that was successfully completed.

      7. Before completing the update the installer will offer deleting the packages created to update the System. 

        When update is successfully completed, this data is recommended to delete.
      8. When updating is successfully completed the installer will offer starting the services which were stopped.

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

        If Consul service is configured incorrectly, the following warning message will be displayed: 

        To finish installation press Enter.

        If the error occurs, the installer will not launch Traffic Monitor services when the installation is finished, so you need to start them manually after the checking described in step 3 of the instruction.

        Предупреждение
        titleWarning!

        Do not start services before you complete the update of the DBMS server and start it. You can wait and start the services after the update or continue without starting them in order to perform it later manually. 

        The services should be started in the order depending on the templates activated on them. 

        After update is complete Nagios monitoring system configuration will be changed to default values. In case you've edited Nagios configuration files before the update, its copies will be created in /etc/infowatch/nagios/iwmon as .saved files. Before starting the Traffic Monitor services move the configuration from .saved files to corresponding new configuration files.

        After the update to manage the monitoring system use iwtm-nagios service.

        For example, to check Nagios status use the command:

        systemctl status iwtm-nagios

      Раскрыть
      titleUpdating in graphical mode

      X Window System uses a client - server model. To run the installer in the graphical mode X11 Forwarding is used to forward the graphical output of remote system. This let you work directly with Linux graphical applications on the computer which is connected to server. This mode is implemented via SSH connection.

      To update Traffic Monitor using graphical mode of installation, take the folowing steps:

      1. On the server, where Traffic Monitor components are planned to update:
        1. Install xauth utility using the command:

          yum install xauth

        2. In /etc/ssh/sshd_config configuration file uncomment the line "X11Forwarding yes". To do this, delete # placed before the line.
        3. Save changes in configuration file.
        4. Restart SSH service using the command:

          systemctl restart sshd

      2. On the computer, where the graphical mode is to be used:
        1. To connect to Traffic Monitor installation server you will require a SSH client with enabled X11 Forwarding option, e.g. PuTTY.
        2. To start the installer in the graphical mode you will require an application configured to access to X Window System, for example:
          • Xming application - for OS MS Windows;
          • Gnome 3 shell - for OS Linux.
      3. Run the application client which was previously configured to access to X Window System.
      4. Connect to server, where Traffic Monitor components are planned to install, using selected SSH client.

        Раскрыть
        titleExample of PuTTY configuration window used to connect

      5. Run the installer using the command:

        ./iwtm-installer-x.x.x.xxx-rhel7

        As per our example:

        ./iwtm-installer-7.57.0.125101-rhel7
        Preparations will be made to start the installation. At this stage the unpacking of files is not being performed.

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

        Before starting the installation a warning about wrong owner of files will be displayed.

        Press Yes to change the owner of files and continue running.

        Otherwise, you can enter N and press Enter, then make corrections manually or using /tmp/iwtm_installer/scripts/check_iwtm.sh  script and start the installer again.

        Предупреждение
        titleWarning!

        If available configured OS repositories are missing, the preparation process will stop with the following alert box:

        To fix this error press OK to dismiss, connect the standard RHEL OS repository, EPEL repository and and restart the installer.

        For more details on the error refer to the log files specified in the alert box.

        After finishing, a window to install Traffic Monitor will be displayed:


        To go to the next parameter press Next button, to go back press - Back. To exit the installer press Cancel button.

      6. The next window will contain data related to availabe upgrades for Traffic Monitor and DBMS.

        Image RemovedImage Added

        To continue press Next.

      7. Confirm the Traffic Monitor services and database were stopped. Steps to confirm the stop and to select a mode will be missed in case the services were stopped manually before starting the installer.

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

        If components of Traffic Monitor are operating on several servers, then you should stop them one after another in the following order:

        1. Interceptors

        2. Indexer
        3. Web console
        4. Database
      8. Select a mode to stop Traffic Monitor:

        • Quick stop - quick stop without events processing;

        • Waiting for stop - wait till the current processing of events is finished;

        • Waiting for emptying file queues - wait till all the events are processed and all the file queues are empty before stopping . The mode is available only on servers with interception components.

          Предупреждение
          titleWarning!

          If interception and analysis components (iw_cas, iw_pas) are used on separate servers, then stopping interceptors and cleaning up file queues may be pending.

          We recommend selecting a different mode or to stop the components manually. 

        To select click in the checkbox next to required value and press Next button.

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

        In case Quick stop is selected, the stopped services will have failed status before the update.

      9. If you've selected  Quick stop or Waiting for stop, events can be sent to error queue after Traffic Monitor resumes the work.

        To continue press Yes button.

        While stopping an events proessing progress will be displayed.

      10. After the services are stopped, a message to start the updating and query to continue will be displayed.


        To start the updating press Yes button.
        The unpacking of Traffic Monitor updating files will start. Implementation progress will be displayed.

        The process may take some time.

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

        If for any reason the installation process was interrupted, eliminate the cause and restart the installer. The installation will continue from the last step that was successfully completed.

      11. After update is complete you can:

        After updating is complete you can:

        • Remove exctracted installer data - when updating is successfully completed you can delete the packages created to install the System. This data is recommended to delete;

        • Start Infowatch Traffic Monitor services - start the services which were stopped.

        To select click in the checkboxes next to required values and press Next button.


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

        If Consul service is configured incorrectly, the following warning message will be displayed: 

        Image RemovedImage Added

        To finish installation press Enter.

        If the error occurs, the installer will not launch Traffic Monitor services when the installation is finished, so you need to start them manually after the checking described in step 3 of the instruction.

        Предупреждение
        titleWarning!

        Do not start services before updating and starting DBMS server. You can either wait and start the services after you update the DBMS server or continue without starting and do it later manually. 

        You are required to start the services in the order that depends on the templates activated on these services.

        Do not start Traffic Monitor services before the server with DB template is updated and started. 

        After update is complete Nagios monitoring system configuration will be changed to default values. In case you've edited Nagios configuration files before the update, its copies will be created in /etc/infowatch/nagios/iwmon as .saved files. Before starting the Traffic Monitor services move the configuration from .saved files to corresponding new configuration files.

        After the update to manage the monitoring system use iwtm-nagios service.

        For example, to check Nagios status use the command:

        systemctl status iwtm-nagios

      12. To finalise the installation press Next or wait till completion of DBMS server update.
      Раскрыть
      titleUpdating in silent mode

      To reduce a user's role in the System updating process there is a silent mode of installation. In this mode Traffic Monitor can be updated using default parameters.

      An options file is realized to be used as a parameter file. In this file you can set required installation parameters. When starting the installation via parameter file, the values specified in this file will be considered the default parameters.


      Parameter file (option file)

      The file contains the following parameters description:

      <parameter's_name>=<parameter's_value>

      You may leave comments using #.

      Блок кода
      languagec#
      titleParameter file example:
      # This file is just an example
      fix_incorrect_file_owners=1
      cleanup_way=clean_fq
      start_services_after_upgrade=1

      The example above contains the parameters as follows:

      • change wrong owner of files to correct one;
      • before stopping the services wait until all events are processed and the queues are cleared;
      • run the services after update.
      Предупреждение
      titleWarning!

      The parameters which are not specified in the file will have the default values. The full list of parameters is specified in the table below.

      To use the parameter file go to installer directory and run it using  --optionfile specifying the file which was previosly created.

      Блок кода
      languagec#
      titleExample of using parameter file:
      ./iwtm-installer-7.57.0.125101-rhel7 --optionfile /some_directory/option-file-example

      An alternative way to use: give the parameter file the same name the installer has, but use .options extension and copy it to installer directory. In this case the running installer will consider the file parameters the default values.

      Silent mode installation

      To update the System in silent mode use  --mode unattended option.

      Level of interaction with user is set by  --unattendedmodeui parameter, which has the following values:

      • none - no information displayed while updating and no interaction is required;
      • minimal - status of implementation is displayed while updating, no interaction is required;
      • minimalWithDialogs - status of implementation is displayed while updating, pop-up windows can be displayed and interaction with user can be required.
      Блок кода
      languagec#
      titleExample of installer running command in silent mode with no user assistance and using parameter file:
      ./iwtm-installer-7.57.0.125101-rhel7 --optionfile /some_directory/option-file-example --mode unattended --unattendedmodeui minimal
      Предупреждение
      titleWarning!

      If available configured OS repositories are missing, the preparation process will stop with the following alert box:

      To fix this error press Enter to dismiss, connect the standard RHEL OS repository, EPEL repository and and restart the installer.

      For more details on the error refer to the log files specified in the alert box.

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

      In case the process is over with no errors, the packages created for installation will be removed by installer. If for any reason the installation process was interrupted, eliminate the cause and restart the installer. The installation will continue from the last step that was successfully completed.

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

      If Consul service is configured incorrectly, the following warning message will be displayed: 

      To finish installation press Enter.

      If the error occurs, the installer will not launch Traffic Monitor services when the installation is finished, so you need to start them manually after the checking described in step 3 of the instruction.

      Full composition of parameter file

      The table below contains full list of possible parameters used for update and their default values.

      Scroll Table Layout
      widths20%, 17%, 13%, 20%, 30%

      NameDefault valueValid valuesDescriptionNote

      force_upgrade

      00,1Forcible switch to updating mode, even if the versions do not match

      fix_incorrect_file_owners

      00,1The parameter defines if the wrong owner of files should be changed before the updateIf the files to be updated have a wrong owner, the update will be interrupted

      cleanup_way

      wait_stopquick_stop, wait_stop, clean_fqSelect the mode to stop services:
      • quick_stop (no events processing);

      • wait_stop (wait until current events processing is complete);

      • clean_fq - (before stopping wait until all events are processed and the queues are cleared)

      If Traffic Monitor components are operating on several servers, then they should be stopped one after another in the following order:

      1. Interceptors

      2. Indexer
      3. Web console
      4. Data base

      All events processing and file queues clearing mode (clean_fq) is available only when interception components are installed on server. In case this mode was selected but there is a lack of interception components on server, the current events processing mode will be used (wait_stop)

      If components of interception and components of analysis (iw_cas, iw_pas) are operating on different servers, then stopping interceptors cleaning file queues might hung. It is recommended to use other modes or to stop them manually. 

      start_services_after_upgrade

      10,1The parameter defines if the installer should run the services after update

      Do not start services before updating DBMS server. After update is complete Nagios monitoring system configuration will be changed to default values. In case you've edited Nagios configuration files before the update, its copies will be created in /etc/infowatch/nagios/iwmon as .saved files. Before starting the Traffic Monitor services move the configuration from .saved files to corresponding new configuration files.

      To manage the monitoring system after the update use iwtm-nagios service.

      For example, to check Nagios status use the command:

      systemctl status iwtm-nagios

      If Traffic Monitor components are operating on several servers, then they should be stopped one after another in the following order:

      1. Data base
      2. Web console
      3. Indexer
      4. Interceptors
    9. Enter the command to find and display the list of files with .rpmnew extension:

      find / -name "*rpmnew*" -print

      In case these files are found, you should merge them correctly with configuration files (please see "Объединение конфигурационных файлов").

      Информация
      titleNotе:

      To merge successfully the configuration files please see the following articles:

      Предупреждение
      titleВажно!

      When updating, do not change files database.conf, consul.json.

      On the server with Web console template after merging in web.conf configuration file, in search_meta block, in hostname parameter please specify DBMS server IP address (TME DB Server).

    10. On servers with Interceptors template in /opt/iw/tm5/etc/scripts/ directory there should be a file iwssid.lua , it should be left with no changes in case it was not edited before the update. Otherwise it should be correctly merged with the file iwssid.lua.rpmnew (please see "Объединение конфигурационных файлов").  

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

      All configuration to work In line was moved to luaengined.conf.

    11. Check Consul cluster - see the description below.

    Якорь
    7.2 Step 2
    7.2 Step 2
    STEP 2. CHECKING CONSUL CLUSTER

    To check Consul cluster take the following steps:

    1. Start Consul on all servers to be updated by running the command:
      service iwtm-consul start
      Enter the command to check status:
      service iwtm-consul status
    2. To check Consul on DBMS server (TME DB Server), enter the command:
      1. To get the IP-address of the primary server in the cluster (leader):
        curl --noproxy 127.0.0.1 http://127.0.0.1:8500/v1/status/leader ; echo
      2. To get the information about cluster members:
        consul members
    3. If no response with the IP-address of the cluster leader, or not all servers are listed as cluster members, configure Consul cluster.
      Recheck after configuration (step 2).
    4. Perform health check of the System internal services - see the description below.

    Якорь
    7.2 Step3
    7.2 Step3
    STEP 3. PERFORMING HEALTHCHECK OF SYSTEM INTERNAL SERVICES

    Start services iw_bookworm, iw_licensed, iw_updater and iw_kicker, check the services status.

    1. Run command to start iw_bookworm service:
      iwtm start bookworm
    2. Service may need some time to start. Enter the command to check the service status:
      curl -s http://localhost:8500/v1/health/checks/iw-bookworm | python -mjson.tool
      The following information will be displayed as a result of command execution:
    3. Check "Node" and "Status" blocks:
      1. "Node" block should contain node's name (that has a service being checked) in Consul cluster;
      2. "Status" block should be "passing".
    4. There should be only one iw_licensed service running on the cluster. Start iw_licensed service using the command:
      iwtm start licensed
    5. The service may need some time to start. Enter the command to check the status of iw_licensed service:
      curl -s http://localhost:8500/v1/health/checks/iw-licensed | python -mjson.tool
      Complete action 3 of the current step.
    6. Run command to start iw_updater service:
      iwtm start updater
    7. The service may need some time to start. Enter the command to check the status of iw_updater service:
      curl -s http://localhost:8500/v1/health/checks/iw-updater | python -mjson.tool
      Complete action 3 of the current step.
    8. To check iw_kicker service you need to start iw_blackboard:
      iwtm start blackboard
    9. There should be only one iw_kicker service running on the cluster. Start iw_kicker service using the command:
      iwtm start kicker
    10. The service may need some time to start. Check /opt/iw/tm5/log/web-console-error.log file to check the status of iw_kicker service and find if any errors occurred during the update. Enter command:
      grep -r 'error' /opt/iw/tm5/log/web-console-error.log || echo "All good"
      Make sure the command address is correct. If no errors found, the All good message will be displayed.
    11. Run command to stop services:
      iwtm stop
    12. Finish update of DBMS server - see description below.
    Предупреждение
    titleImportant!

    In case a service has not started successfully, check if there are errors in appropriate log file occured during the update. And contact InfoWatch technical service at support@infowatch.com.

    Also, you can check the support section on our site:

    www.infowatch.com/support.

    Log files for checking:

    • /opt/iw/tm5/log/bookworm.log - iw_bookworm service
    • /opt/iw/tm5/log/updater.log - iw_updater service
    • /opt/iw/tm5/log/licserv.log - iw_licensed service
    • /opt/iw/tm5/log/web-console-error.log - iw_kicker service

    To exclude errors, we recommend checking log files even if the services have been started successfully.

    Recommended logging level - not lower than INFO. A log file can be missing if no errors registered.


    Якорь
    7.2 Step 4
    7.2 Step 4
    STEP 4. COMPLETING SERVERS UPDATE

    To complete servers update, the following action are to be taken as per each of the servers:

    1. If the installer operation was not completed before, select the services running and finalise the update.
      In case the installer completed operation with no services started, run them manually or reboot the server to restart all the services.
      Use the following command:
      reboot

      Предупреждение
      titleWarning!

      Components of Traffic Monitor should be started in the following order:

      1. Database

      2. Web console
      3. Indexer
      4. Intercepters


      Предупреждение
      titleWarning!

      After the start, Traffic Monitor connects to DB and loads the configuration file cas_config.xml. from it. Depending on size of the file, its loading may take some time.

      During the loading process, the System may record error messages in log files:

      • Раскрыть
        title/opt/iw/tm5/log/cas_config_compiler.log
        Блок кода
        languagejs
        titleError record
        linenumberstrue
        1 2019-10-07 17:00:57.351489 (3936:0x00007f4008de8880) [ERROR  ] : <Root> Exception:.
        Diagnostic information..
        /sandbox/src/cas3/config/details/cas_factory.cpp(233): Throw in function bool cas::CasConfigFactory::LoadXmlConfig(cas::ConfigCreator::Ptr&, const boost::filesystem::path&) const
        Dynamic exception type: boost::exception_detail::clone_impl<cas::ExceptionCasConfig>
      • Раскрыть
        title/opt/iw/tm5/log/cas.log
        Блок кода
        languagejs
        titleError record
        linenumberstrue
        1 2019-10-03 17:39:13.348146 (14262:0x00007fe83892ba80) [WARNING] : <Root> Prometheus server is off, therefore the statistics is unavailable. That's what you wanted, isn't it?
        2 2019-10-03 17:39:14.364655 (14262:0x00007fe83892ba80) [ERROR  ] : <Root> Error when loading config of tech: Cannot open xml file with cas configuration: etc/config/cas/cas_config.xml
        3 2019-10-03 17:39:14.364856 (14262:0x00007fe83892ba80) [ERROR  ] : <Root> failed to initialize thrift server
        Diagnostic information.
        /sandbox/src/cas3/handler.cpp(682): Throw in function cas::Handler::LoadedConfigData cas::Handler::GetLoadedConfigData(const prop::Property&, const Ptr&)
        Dynamic exception type: boost::exception_detail::clone_impl<tech::ExceptionTechLoadConfig>
        std::exception::what: Cannot open xml file with cas configuration: etc/config/cas/cas_config.xml

      When cas_config.xml file loading is complete the System will stop recording errors and will operate normally.

      If the System keeps recording errors for a long time, check the connection to the DB.


    2. In Traffic Traffic Monitor 7.6, we have extended the list of default tasks that automatically delete obsolete tasks.
      Tasks for the cron scheduler are now specified in the /etc/cron.d/iwtm_cleanup file (file contents are described in the "Автоматическое удаление ненужных файлов в Traffic Monitor" article).
      For new tasks to work correctly:
      1. Delete obsolete tasks by editing the cron configuration file:
        sudo crontab -e
      2. Save changes and exit the configuration file editor.
      3. Restart the service:
        systemctl reload crond
    3. If you haven't edited the previous /etc/cron.d/iwtm_error_queue file with tasks before the update, then skip this step. 
      Otherwise, the /etc/cron.d/iwtm_error_queue file will be deleted and its contents will be saved in the /etc/cron.d/iwtm_error_queue.rpmsave file.
      For earlier added tasks to start working again, create a file for your tasks in the /etc/cron.d/ directory and copy required tasks from /etc/cron.d/iwtm_error_queue.rpmsave to this file.

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

      You can add your tasks to the /etc/cron.d/iwtm_cleanup file. On the next update, this file will be renamed to /etc/cron.d/iwtm_cleanup.rpmnew and replaced with a file with default content. After the next update, you will need to move added tasks from the /etc/cron.d/iwtm_cleanup.rpmnew file to a new /etc/cron.d/iwtm_cleanup file.
      To avoid moving tasks every time, you can create a separate file with your tasks in the /etc/cron.d/ directory.

    4. If you have the Prometheus system installed and in case the server with Database template has not been rebooted to stop the service you should run the following command:

      systemctl start iwtm-postgres_exporter - for PostgreSQL DBMS
      systemctl start iwtm-oracledb_exporter - for Oracle DBMS

    5. On server with Web console template enter the command to clear cache of packages manager:

      redis-cli flushall

    6. Enter the command to clear cache:

      yum clean all

    7. Enter the command to test processes' start:

      iwtm status

      A list of processes and their statuses will be displayed.

    Updating Traffic Monitor All-in-one server is complete. The version of the System in the About the System window of the Management Console will be changed. If the System includes other servers or subsystems to be updated, follow the instructions in this section.

    Предупреждение
    titleWarning!

    If you have configured automatic synchronizations with LDAP servers, to guarantee the download of essences after update is completed, you should run the synchronising manually (for more details please see "Infowatch Traffic Monitor. User guide",

    "Running Synchronization with Server Manually" article).
    Информация
    titleNote:

    To display data correctly via Management console you should delete the cache in the browser you use. This can be done using the browser standard tools.

    Раскрыть
    titleUpdating the System via installation and restoring data from the backup copy (for PostgreSQL)  

    Якорь
    Backup_Update
    Backup_Update

    Предупреждение
    titleWarning!

    We strongly recommend backing up the System, cloning it, and updating on this particular testing machine. 
    If you do not want to copy the data because you will mount the disk or the section containing your data, we recommend to backup them anyway.
    After clear installation of the System you will need to set the configuration files of Traffic Monitor again. We recommend to store them so you can configure settings after the update.

    1. To stop Traffic Monitor services, run the command:
      iwtm stop
    2. On the server with Web console template run the command:
      systemctl stop iwtm-php-fpm
    3. On the server with Database template connect to DB and check the number of events it contains:
      1. To connect to the DB server, run the command in the console:
        su - iwtm
        psql postgres iwtm -p 5433

      2. Then run the command:
        select count(1) from object;
      3. To exit, run the command:
        \q

      4. Run the command:
        exit

    4. Complete database and indexes backup.
    5. Install a new version of Trafic Monitor.

      Предупреждение
      titleWarning!

      If the backup copies of your DB are stored on external devices, do not connect them during the update. You need to do it before restoring and updating the DB.

      When the update is complete, do not remove the packages created by the installer during the process of update (the point Remove extracted installer data).

    6. To stop services on all servers, run the commands:
      iwtm stop
      systemctl stop iwtm-nagios
    7. On the server with Web console template run the command:
      systemctl stop iwtm-php-fpm
    8. On the server with Database template:
      1. Enter the command to stop the DB:
        systemctl stop postgresql-13

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

        To restore the initial state of clean installation, you can copy the directories u01 and u02.

      2. To change the access rights to the directory, enter the command:
        chmod 777 /var/log/infowatch/update
      3. Copy reserve DB copy so that it was located the same way it was placed initially. 
      4. Go to the directory u01 by running the command:
        cd /u01
      5. To change the owner of the directories, use the command:
        chown -R postgres:postgres postgres
      6. o to the directory u02 using the command:
        cd /u02
      7. To change the owner of the directories, use the commands:
        chown -R postgres:postgres arch
        chown -R postgres:postgres pgdata
        chown -R postgres:postgres pgdata1

      8. Enter the command to go to the directory that contains scripts:
        /tmp/iwtm_installer/scripts
      9. From the directory run the script to update the DBMS by using the command:
        ./install_postgres.sh --distrib_path=<directory_with_DBMS_distributive> --tm_version=<new_version_of_Traffic_Monitor> --update
        As per our example:
        ./install_postgres.sh --distrib_path=/root --tm_version=7.57.0.125101 --update

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

        In the example the distributive iwtm-postgresql-13.8-x.x.x.xxx-rhel7.tar.gz is located in the /root directory.
        To view the version of Traffic Monitor you have installed, enter the command:
        cat /opt/iw/tm5/version

      10. After the successfull update complete the command to check the status of DBMS service:
        systemctl status postgresql-13
      11. Run the script to update the data scheme by using the command:
        ./install_dbschema.sh --tm_version=<new_version_of_Traffic_Monitor> --db_type=postgres --update
         As per our example:
        ./install_dbschema.sh --tm_version=<7.57.0.125101 --db_type=postgres --update
      12. Complete the step 3 of the instruction to compare the number of events in the DB before and after the update.
    9. On the server with Indexer template copy the backup copies of indexes so that they were located the same way it was placed initially.
    10. On the server with Web console template copy the backup copy of iw_adlibitum service configuration so that they were located the same way it was placed initially.If the initial location is not the default one, then you will have to specify it in the corresponding sections of the configuration files (see backup instructions).
    11. On the server with Web console template run the commands:
      sudo -u iwtm touch /opt/iw/tm5/www/backend/protected/runtime/first_run
      iwtm restart kicker
    12. Run the command to reboot the server:
      reboot

      Предупреждение
      titleWarning!

      You should start components of Traffic Monitor one after another in the following order:

      1. Database

      2. Web console
      3. Indexer
      4. Interceptors


    13. Enter the command to clear cache:

      redis-cli flushall

    14. Enter the command to check statuses of the processes:
      iwtm status 
      The list of processes and their statuses will be displayed.

    Updating Traffic Monitor All-in-one server is complete. The version of the System in the About window of the Management Console will be changed. If the System includes other servers or subsystems to be updated, follow the instructions in this section.

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

    Clear cache of your browser before starting the works, so the Console is displayed correctly. You can do it by using the standard tools of your browser.