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

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

Ключ

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

Перед обновлением Traffic Monitor до версии 7.4 рекомендуется сначала обновить cервер Device Monitor.

В Traffic Monitor 7.4 на РЕД ОС поддерживается обновление только с версии 7.4.x до 7.4.y. Обновление с версий ниже 7.4.0 не поддерживается.

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

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

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

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

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

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

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

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

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

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

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

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

  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.3.1.130",
      "all_in_one": true,

    Запись из примера соответствует серверу с типом установки Traffic Monitor Enterprise All-in one и версией 7.3.1.130.

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

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

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

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

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

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

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

    1. Для остановки сервисов Traffic Monitor введите команду:
      iwtm stop
    2. Введите команду:
      systemctl stop iwtm-php-fpm
    3. Выполните резервное копирование:

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

        • для СУБД Oracle:
          systemctl stop oracle
        • для СУБД PostgreSQL:
          systemctl stop postgresql-13
      2. Создайте резервную копию Базы данных. По умолчанию База данных расположена в директориях  /u01, /u02  и т.д.
        Скопируйте Базу данных либо на другой раздел сервера, либо на другой сервер, либо на внешнее устройство.

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

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

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

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

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

      4. Создайте резервную копию конфигурации службы iw_adlibitum. Для этого:

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

        2. В параметре "ConfigDir" указан относительный путь к директории с конфигурации службы iw_adlibitum. Путь к директории указывается относительно содержимого параметра "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/postgrespostgresql.conf
    Информация
    titleПримечание:
    Также инсталлятор автоматически создает копии файлов настроек окружения в директории /tmp/iwtm_db_configs_backup. Для удобства пользователя инсталлятор воссоздает в директории пути оригинальных файлов, по которым их нужно будет скопировать для восстановления исходного состояния.
    Созданные инсталлятором резервные копии хранятся только до успешного обновления. По завершении они будут удалены.
Предупреждение
titleВажно!

Для обновления с версии 6.10 предварительно обновите Traffic Monitor до версии 7.2 по соответствующей инструкции.

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


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

Якорь
inplace
inplace

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

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

Чтобы обновить Систему выполните следующие действия:

  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.5-x.x.x.xxx-rhel7.tar.gz -
     если
    • если будет использована СУБД PostgreSQL на ОС Red Hat Enterprise Linux, CentOS или Oracle Linux;
    • iwtm-
    oracle
    • installer-
    19
    • x.
    0
    • x.
    0.0.0
    • x.xxx-redos-73 - для обновления на РЕД ОС;
    • iwtm-postgresql-13.5-x.
    xx
    • x.x.xxx-redos-73.tar.gz -
     если
    • если будет использована СУБД
    Oracle.В нашем примере: 
    • PostgreSQL на РЕД ОС;
    • iwtm-
    installer
    • oracle-
    7.
    • 19.0.0.0.0-x.xx.x.tar.gz - если будет использована СУБД Oracle.
    В нашем примере: 
    • iwtm-installer-7.4.0.
    152
    • 140-rhel7 - для обновления на ОС Red Hat Enterprise Linux, CentOS или Oracle Linux;
    • iwtm-postgresql-13.5-7.4.0.
    152
    • 140-rhel7.tar.gz - если будет использована СУБД PostgreSQL на ОС Red Hat Enterprise Linux, CentOS или Oracle Linux;
    • iwtm-
    oracle
    • installer-
    19
    • 7.
    0
    • 4.
    0.0.0
    • 2.193-redos-73 - для обновления на РЕД ОС;
    • iwtm-postgresql-13.5-7.4.0.
    152
    • 140-redos-73.tar.gz -
     если
    • если будет использована СУБД
    Oracle.Чтобы сделать файл
    • PostgreSQL на РЕД ОС;
    • iwtm-

    installer
    • oracle-

    x
    • 19.0.

    x
    • 0.

    x
    • 0.

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

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

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

    Подключите внешние или локальные репозитории Red Hat Enterprise Linux 7.
    С инструкцией по настройке локального репозитория можно ознакомиться на официальном сайте Red Hat Enterprise Linux (страница доступна на английском языке)
    • 0-7.4.0.140.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

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

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

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

  4. Раскрыть
    titleЕсли вы обновляете Traffic Monitor на РЕД ОС:
    1. Откройте в директории /etc/yum.repos.d файл, в котором указаны настройки подключения к репозиторию Updates. Убедитесь, что в нём нет исключения в виде строки:
      exclude=postgresql13*
      Если строка имеется, удалите её.
    2. Выполните команду для обновления пакетов:
      yum upgrade
    3. Выполните команду для вывода списка пакетов:
      rpm -qa | grep postgresql13
    4. Проверьте, чтобы в выводе команды версии пакетов были не ниже 13.5-5. Если версии пакетов ниже, обновите их.
      Если в выводе команды пакеты версии 13.5, пропустите действие j.
    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.5-7.4.x.xxx-redos-7.3.tar.gz>"
      cd iwtm-postgresql-13.5-7.4.x.xxx-redos-7.3
      В нашем примере:
      tar --verbose -C "/opt/distr/postgresql" -xzf "/root/iwtm-postgresql-13.5-7.4.2.193-redos-7.3.tar.gz"
      cd iwtm-postgresql-13.5-7.4.2.193-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. Если в действии d версия пакетов была 13.8, установите пакет с помощью команды:
      yum install libpq-13.4
    11. Для перенастройки сервиса последовательно выполните команды:
      mv /etc/systemd/system/postgresql.service.d/ /etc/systemd/system/postgresql-13.service.d/
      systemctl daemon-reload
      systemctl start postgresql-13

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

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

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

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

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

  6. Если у вас установлена система Prometheus, для остановки службы выполните команду:

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

  7. Введите команду для перехода в директорию c дистрибутивами Traffic Monitor:
    cd /root

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

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

    • для СУБД Oracle:
      systemctl start oracle
    • для СУБД PostgreSQL:
      systemctl start postgresql-13
  8. В инсталляторе реализован механизм автоматического объединения конфигурационных файлов Traffic Monitor старой и новой версии.

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

    Автоматическое объединение затрагивает только конфигурационные файлы Traffic Monitor с расширением .conf, расположенные в директории /opt/iw/tm5/etc.
    Перед объединением в директории /opt/iw/tm5/etc_conf_backup_<дата_время> будут созданы резервные копии исходных конфигурационных файлов. Пример названия директории: /opt/iw/tm5/etc_conf_backup_05.05.2022_09:26:33.
    После успешного объединения файлы с расширением.rpmnew, которые относятся к затрагиваемым конфигурационным файлам, будут удалены.
    Все выполненные действия будут отражены в лог-файле /var/log/infowatch/iwtm-install-<версия>-<дата>_<время>.log. Пример названия лог-файла: /var/log/iwtm-install-7.4.0.152-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.4.0.152-rhel7

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

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

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

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


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

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

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

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


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

        В окне будут указаны доступные обновления для Traffic Monitor и СУБД.

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

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

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

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

      4. Выберите режим остановки Traffic Monitor:
        • Quick stop - быстрая остановка без обработки событий;

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

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

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

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

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

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

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

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

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

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

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

        При обновлении с версии 7.2:
        Если до обновления в файлы /opt/iw/tm5/etc/config-perm/bookworm/extractors.xml и /opt/iw/tm5/etc/config-perm/bookworm/formats.xml были добавлены кастомизации, обязательно выполните следующие действия до запуска сервисов:

        1. Перейдите в директорию /opt/iw/tm5/etc/config-perm/bookworm.
        2. Перенесите все необходимые кастомизации экстракторов из файла extractors.xml в файл extractors_custom.xml.
        3. Перенесите все необходимые кастомизации форматов из файла formats.xml в файл formats_custom.xml.
        4. Удалите файлы extractors.xml и formats.xml.
        5. Переименуйте файлы extractors.xml.rpmnew и formats.xml.rpmnew в файлы extractors.xml и formats.xml соответственно.

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

        При обновлении с версии 7.3 убедитесь, что добавленные вами кастомизации форматов и экстракторов указаны в файлах formats_custom.xml и extractors_custom.xml, в противном случае они будут потеряны в процессе обновления.

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

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

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

        Если не запустить сервисы, то для восстановления работоспособности Системы их придется запустить позже вручную.

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

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

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

        Раскрыть
        titleДля корректной работы Системы выполните проверку и настройку кластера службы 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.
          После настройки повторите проверку (действие ii).

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

      8. Перед завершением работы инсталлятор предложит удалить пакеты, созданные для обновления.
        Если обновление прошло успешно, данные рекомендуется удалить.
      9. Дождитесь завершения работы инсталлятора.
    • Раскрыть
      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.4.0.152-rhel7

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

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

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

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

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

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

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

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


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

        Для перехода к следующему окну используется кнопка Next, для возврата к предыдущему - Back. Для выхода из инсталлятора - кнопка Cancel.
      6. В следующем окне будут указаны доступные обновления для Traffic Monitor и СУБД.

        Для продолжения нажмите Next.

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

      8. Выберите режим остановки Traffic Monitor:

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

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

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

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

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

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

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

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


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

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

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

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

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

        • Start Infowatch Traffic Monitor services - запустить остановленные сервисы. Если не запустить сервисы, то для восстановления работоспособности Системы их придется запустить позже вручную.

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

          При обновлении с версии 7.2:
          Если до обновления в файлы /opt/iw/tm5/etc/config-perm/bookworm/extractors.xml и /opt/iw/tm5/etc/config-perm/bookworm/formats.xml были добавлены кастомизации, обязательно выполните следующие действия до запуска сервисов:

          1. Перейдите в директорию /opt/iw/tm5/etc/config-perm/bookworm.
          2. Перенесите все необходимые кастомизации экстракторов из файла extractors.xml в файл extractors_custom.xml.
          3. Перенесите все необходимые кастомизации форматов из файла formats.xml в файл formats_custom.xml.
          4. Удалите файлы extractors.xml и formats.xml.
          5. Переименуйте файлы extractors.xml.rpmnew и formats.xml.rpmnew в файлы extractors.xml и formats.xml соответственно.

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

          При обновлении с версии 7.3 убедитесь, что добавленные вами кастомизации форматов и экстракторов указаны в файлах formats_custom.xml и extractors_custom.xml, в противном случае они будут потеряны в процессе обновления.

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

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

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

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

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

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

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

          Раскрыть
          titleДля корректной работы Системы выполните проверку и настройку кластера службы 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.
            После настройки повторите проверку (действие ii).

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

      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.4.0.152-rhel7 --optionfile /some_directory/option-file-example

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

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

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

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

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

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

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

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

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

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

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

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

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

      Раскрыть
      titleДля корректной работы Системы выполните проверку и настройку кластера службы 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.
        После настройки повторите проверку (действие ii).

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

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

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

      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 - перед остановкой дождаться обработки всех событий и очистки файловых очередей.

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

      start_services_after_upgrade

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

      При обновлении с версии 7.2:
      Если до обновления в файлы /opt/iw/tm5/etc/config-perm/bookworm/extractors.xml и /opt/iw/tm5/etc/config-perm/bookworm/formats.xml были добавлены кастомизации, обязательно выполните следующие действия до запуска сервисов:

      1. Перейдите в директорию /opt/iw/tm5/etc/config-perm/bookworm.
      2. Перенесите все необходимые кастомизации экстракторов из файла extractors.xml в файл extractors_custom.xml.
      3. Перенесите все необходимые кастомизации форматов из файла formats.xml в файл formats_custom.xml.
      4. Удалите файлы extractors.xml и formats.xml.
      5. Переименуйте файлы extractors.xml.rpmnew и formats.xml.rpmnew в файлы extractors.xml и formats.xml соответственно.

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

      При обновлении с версии 7.3 убедитесь, что добавленные вами кастомизации форматов и экстракторов указаны в файлах formats_custom.xml и extractors_custom.xml, в противном случае они будут потеряны в процессе обновления.

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

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

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

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

  10. Снова введите команду для вызова файлового менеджера:
    mc

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

  12. Для выхода из файлового менеджера:
    exit
  13. Если ранее работа инсталлятора не была завершена, выберите запуск сервисов и завершите обновление.
    Если ранее инсталлятор завершил работу без запуска сервисов, запустите их вручную или перезагрузите сервер для запуска всех остановленных сервисов.
    Команда для перезагрузки сервера:
    reboot

    Предупреждение
    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 Система прекратит запись сообщений об ошибках и заработает в штатном режиме.

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

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

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

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

    yum clean all

  16. Введите команду для очистки кеша:
    redis-cli flushall

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


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

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

После успешного обновления СУБД вы можете удалить файлы, оставшиеся от прошлой версии ПО.

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

Перед удалением обязательно проверьте, что:

  • запущены и работают все сервисы, предусмотренные в данной Системе;
  • в консоли ТМ отсутствуют ошибки на вкладке Состояние Системы;
  • старые события находятся в БД. Возможно проверить на вкладке События с помощью запроса с соответствующей датой перехвата;
  • новые события попадают в БД.

Для удаления выполните команды:

  • если используется СУБД PostgreSQL:
    yum erase postgresql96*
    /u01/postgres/tmp/delete_old_cluster.sh
  • если используется СУБД Oracle:
    su - "oracle" -c "rm -rf ${ORACLE_HOME}.backup"
Предупреждение
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-php-fpm
    systemctl stop iwtm-nagios
  7. Введите команду для остановки Базы данных:
    systemctl stop postgresql-13

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

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

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

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

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

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

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

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

  21. Введите команду для перезагрузки сервера:
    reboot
    Дождитесь загрузки сервера и повторно авторизуйтесь, выполнив действия 1-3 инструкции перед обновлением.
  22. Введите команду для очистки кеша:

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

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

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

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

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

Before updating Traffic Monitor to version 7.4, we recommend updating the Device Monitor server first.

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. 

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. Check the version and type of installation of the server you need to update. You can see the version and installation type in the file  /opt/iw/tm5/install_mode.

    Блок кода
    languagetext
    titleExample of content:
      "product_type": "tme",
      "version": "7.3.1.130",
      "all_in_one": true,

    The example is given for a server with the type of installation Traffic Monitor Enterprise All-in one and the version7.3.1.130.

  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 updating parameters of unit files the initialisation systems systemd 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. To stop Traffic Monitor services enter the command:
      iwtm stop
    2. Enter the command:
      systemctl stop iwtm-php-fpm
    3. Perform the backup:

      1. Depending on the database you are using and the version of Traffic Monitor, enter the command to stop the database:
        • for Oracle DBMS:
          systemctl stop oracle
        • for PostgreSQL DBMS:
          systemctl stop postgresql-13
      2. 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.

        Информация
        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)
      3. Perform indexes backup. To do this:
        1. Go to the directory /opt/iw/tm5/etc and open to view the file indexer.conf.

        2. In the parameter "SphinxBaseDir" you can see the path to the directorty that contains the indexes. In the parameter "ArchiveDir" you can see a relative path to indexes archive. The path is specified relating to the content of "NookDir" parameter. 
          Copy the directories with indexes and indexes archives either on a separate section of the server or on another server or on an external device.

      4. Create the backup of iw_adlibitum service configuration. To do this:
        1. Go to the directory /opt/iw/tm5/etc and open the file adlibitum.conf to view.

        2. In the parameter "ConfigDir" you can see a relative path to the directory that contains the configuration of iw_adlibitum service. The path is specified relating to the content of "NookDir" parameter. 
          Copy the directory with the configuration either on a separate section of the server or on another server or on an external device.

  2. Раскрыть
    titleBackup configuration of the 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/ - all files in the directory
      • /etc/default/iwtm
      • /etc/profile.d/iw-oracle-env.sh
      • /etc/logrotate.d/iwtm-oracle-conf-server
      • /opt/iw/tm5/etc/oracle.conf
    • Раскрыть
      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:

    In the directory /tmp/iwtm_db_configs_backup the installer automatically creates copies of files of environment settings. To make it easier for the user, the installer recreates in the directory the paths of original files. Use the paths when you need to copy the files to restore their initial state.

    The backup copies created by the installer are stored untill uptate. They will be deleted after the update is complete. 

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

To update the System from version 6.10, you should first update the System to version 7.2 using the corresponding instruction.

Depending on the update mode, select the instruction:

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

Якорь
inplace
inplace

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

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

To upgrade the System, please take the following actions:

  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 (where x.x.x.xxx is the build number)
    • iwtm-postgresql-13.5-x.x.x.xxx-rhel7.tar.gz - if you use PostgreSQL DBMS;
    • iwtm-oracle-19.0.0.0.0-x.xx.x.tar.gz - if you use Oracle DBMS.

    As per our example: 

    • iwtm-installer-7.4.0.152-rhel7;
    • iwtm-postgresql-13.5-7.4.0.152-rhel7.tar.gz - if you use PostgreSQL DBMS;
    • iwtm-oracle-19.0.0.0.0-7.4.0.152.tar.gz - if you use Oracle DBMS.

  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.4.0.152-rhel7

  3. Connect external or local Red Hat Enterprise Linux 7 repositories. You can find instructions on how to configure local repository at the Red Hat Enterprise Linux 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 you should run the following command::

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

  6. Enter the command to go to Traffic Monitor distribution kit directory:

    cd /root

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

    Before starting the update, you are recommended to start the database service, in case it was stopped before. In accordance with DBMS used please type the command to run:

    • for Oracle DBMS
      service oracle start 
    • for PostgreSQL DBMS
      systemctl start postgresql-13
  7. 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_06.05.2022_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.4.0.152-2022-09-10_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 will be stopped until the user corrects the errors. Restart the update after the errors are corrected.

    Run the installer using one of the modes:

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

    To update Traffic Monitor using server console, take the following steps:

    1. Start the Traffic Monitor installer running the command:

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

      Our example command:

      ./iwtm-installer-7.4.0.152-rhel7

      Preparations will be made to start the updating. At this stage the unpacking of Traffic Monitor files is not being performed.

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

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

      Type Y and press Enter 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 error message:

      To fix this error press Enter to exit, connect the standard RHEL repository, EPEL repository 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:

      It 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.
    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.

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

      Информация

      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 proessing progress will be displayed.
    6. After the services are stopped, a message to start the updating and query to continue will be displayed.

      To start the updating 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. When updating is successfully completed the installer will offer starting the services which were stopped.

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

      When updating Traffic Monitor from the version 7.2:

      If before update you have added customization to the files /opt/iw/tm5/etc/config-perm/bookworm/extractors.xml and /opt/iw/tm5/etc/config-perm/bookworm/formats.xml then it is required to complete the following steps before starting the services:

        1. Go to the directory /opt/iw/tm5/etc/config-perm/bookworm.
        2. Transfer all the customizations you need from extractors.xml file to extractors_custom.xml file. 
        3. Transfer all the format customizations you need from formats.xml to formats_custom.xml.  
        4. Remove the files extractors.xml and formats.xml.
        5. Rename the files extractors.xml.rpmnew and formats.xml.rpmnew into extractors.xml and formats.xml accordingly.

      If you do not transfer the customizations, then they will be lost during future updates.

      When updating Traffic Monitor from the version 7.3 make surethat the transferred customizations of formats and extractors are specified in the files formats_custom.xml and extractors_custom.xml, otherwise they will be lost during the update.

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

      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

      If you do not run the services, to recover the System's efficiency you should run it later manually.

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

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

      To finish installation press Enter.

      Раскрыть
      titleFor correct work of System check and configure Consul service cluster
        1. Start Consul service with the command:
          systemctl start iwtm-consul
          To check the service status enter the command:
          systemctl status iwtm-consul
        2. To check Consul enter the command:
          1. To display IP address of main server (leader) of cluster:
            curl --noproxy 127.0.0.1 http://127.0.0.1:8500/v1/status/leader ; echo
          2. To display information about cluster members:
            consul members
        3. If the IP address of cluster leader is not displayed, configure cluster of Consul service.
          After configuration is complete, repeat checking (step ii).

      If the error occurs, the installer will not launch Traffic Monitor services when the installation is finished, so you need to start them manually.

    8. Before completeting 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.
    9. Wait till completion of installer operation.
    Раскрыть
    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.4.0.152-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 error message:

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

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

      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.

      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.
    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.
        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.

      Информация

      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 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 stopped services. Otherwise, you need to restore System availability manually later.

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

        When updating Traffic Monitor from the version 7.2:

        If before update you have added customization to the files /opt/iw/tm5/etc/config-perm/bookworm/extractors.xml and /opt/iw/tm5/etc/config-perm/bookworm/formats.xml then it is required to complete the following steps before starting the services:

        1. Go to the directory /opt/iw/tm5/etc/config-perm/bookworm.
        2. Transfer all the customizations you need from extractors.xml file to extractors_custom.xml file. 
        3. Transfer all the format customizations you need from formats.xml to formats_custom.xml.  
        4. Remove the files extractors.xml and formats.xml.
        5. Rename the files extractors.xml.rpmnew and formats.xml.rpmnew into extractors.xml and formats.xml accordingly.

        If you do not transfer the customizations, then they will be lost during future updates.

        When updating Traffic Monitor from the version 7.3 make surethat the transferred customizations of formats and extractors are specified in the files formats_custom.xml and extractors_custom.xml, otherwise they will be lost during the update.

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

        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

        Mark the checkboxes to select the actions you need:

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

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

        To finish installation press OK.

        Раскрыть
        titleFor correct work of System check and configure Consul service cluster
        1. Start Consul service with the command:
          systemctl start iwtm-consul
          To check the service status enter the command:
          systemctl status iwtm-consul
        2. To check Consul enter the command:
          1. To display IP address of main server (leader) of cluster:
            curl --noproxy 127.0.0.1 http://127.0.0.1:8500/v1/status/leader ; echo
          2. To display information about cluster members:
            consul members
        3. If the IP address of cluster leader is not displayed, configure cluster of Consul service.
          After configuration is complete, repeat checking (step ii).

        If the error occurs, the installer will not launch Traffic Monitor services when the installation is finished, so you need to start them manually.

    12. To finalise the installation press Next.

    Раскрыть
    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.4.0.152-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.4.0.152-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 error message:

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

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

    Информация
    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.

    Раскрыть
    titleCheck and configure cluster of Consul service for correct work of the System:
    1. Start Consul service with the command:
      systemctl start iwtm-consul
      To check the service status enter the command:
      systemctl status iwtm-consul
    2. To check Consul enter the command:
      1. To display IP address of main server (leader) of cluster:
        curl --noproxy 127.0.0.1 http://127.0.0.1:8500/v1/status/leader ; echo
      2. To display information about cluster members:
        consul members
    3. If the IP address of cluster leader is not displayed, configure cluster of Consul service.
      After configuration is complete, repeat checking (step ii).

    If the error occurs, the installer will not launch Traffic Monitor services when the installation is finished, so you need to start them manually.

    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)

    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)

    start_services_after_upgrade

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

    When updating from the version 7.2: If any customizations were added to /opt/iw/tm5/etc/config-perm/bookworm/extractors.xml and /opt/iw/tm5/etc/config-perm/bookworm/formats.xml files before the update, it is required to perform the following steps before starting the services:

    1. Go to /opt/iw/tm5/etc/config-perm/bookworm directory.
    2. Move all the necessary extractor customizations from extractors.xml to extractors_custom.xml.
    3. Move all the necessary format customizations from formats.xml to formats_custom.xml.
    4. Delete extractors.xml and formats.xml files.
    5. Rename extractors.xml.rpmnew and formats.xml.rpmnew files to extractors.xml and formats.xml, respectively.

    If customizations are not moved, they will be lost in future updates.


    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

  8. Enter the command to find and display the list of files with .rpmnew extension at the console:
    find / -name "*rpmnew*" -print
    If the files have been found, they should be correctly merged with configuration files (see "Merging configuration files").

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

    To merge successfully the configuration files you should read the following articles on the official site:

  9. Enter the command to call the file manager again:
    mc
  10. In the directory /opt/iw/tm5/etc/scripts/ there should be the file iwssid.lua. If it was not changed before the update, it is recommended to not change it. Otherwise, properly merge it with the configuration file iwssid.lua.rpmnew(see "Merging configuration files").

  11. To exit the file manager:
    exit
  12. If the installer has not complete its work before, select start of services and finish the update. If the installer has completed its work without running the services, start them manually or reboot the server to start all stopped services.
    To reboot the server:
    reboot

    Предупреждение
    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.

  13. If you have the Prometheus system installed and in case the server 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

  14. Enter the command to clear cache of packages manager:
    yum clean all
  15. Enter the command to clear cache:
    redis-cli flushall
  16. 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 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:

After the DBMS was successfully update you can remove files which belongs to previous versions.

This can be done only after the System is completely updated and check is performed.

Before removing the files, please make sure that:

  • the services arranged for this System are running and working;
  • the Management concole contains no errors at System state section;
  • old events are placed to DB. You can check this on Events section, using a query with corresponding date of interception;
  • new events are sent to DB.

To remove the files run the following command:

  • if you use PostgreSQL DBMS:
    yum erase postgresql96*
    /u01/postgres/tmp/delete_old_cluster.sh
  • if you use Oracle DBMS:
    su - "oracle" -c "rm -rf ${ORACLE_HOME}.backup"
Предупреждение
titleWarning!

If you have configured automatiс synchronizations with LDAP servers, to guarantee the download of entities after update is completed, you should run the synchronization 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. Run the command:
    systemctl stop iwtm-php-fpm
  3. 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, run the commands:
    iwtm stop
    systemctl stop iwtm-php-fpm
    systemctl stop iwtm-nagios
  7. 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.

  8. To change the access rights to the directory, enter the command:
    chmod 777 /var/log/infowatch/update
  9. Copy reserve DB copy so that it was located the same way it was placed initially. 
  10. Go to the directory u01 by running the command:
    cd /u01
  11. To change the owner of the directories, use the command:
    chown -R postgres:postgres postgres
  12. Go to the directory u02 using the command:
    cd /u02
  13. 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

  14. Enter the command to go to the directory that contains scripts:
    /tmp/iwtm_installer/scripts
  15. 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.4.0.152 --update

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

    In the example the distributive iwtm-postgresql-13.5-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

  16. After the successfull update complete the command to check the status of DBMS service:
    systemctl status postgresql-13
  17. 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.4.0.152 --db_type=postgres --update
  18. Complete the step 3 of the instruction to compare the number of events in the DB before and after the update.
  19. Copy the backup copies of indexes and configurations of iw_adlibitum service 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 steps ciii and civ).
  20. Run the commands:

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

  21. Run the command to reboot the server:
    reboot
    Wait untill the server is rebooted, then log in again by completing the steps 1-3 of the instruction before the update. 
  22. Enter the command to clear cache:

    redis-cli flushall
  23. 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.