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

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

Ключ

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

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


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

Консоль выглядит так:

 

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

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

      Откроется окно с консолью сервера.
  2. В строке строке Login as: (или или login: - в зависимости от разновидности сервера) введите введите root и нажмите  и нажмите Enter.


  3. В строке строке root@<адрес_сервера>'s password: (или или Password: - в зависимости от разновидности сервера) введите пароль пользователя пользователя root (суперпользователя) и нажмите Enter.
    Обратите внимание, что при вводе символов в строке ничего не будет отображаться.

    На экране отобразится служебная информация и - последней строкой - приглашение ввести команду (командная строка).

    Примечание:
    Информация
    titleПодсказка:

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

    Информация
    title

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

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

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

    mc

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

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

  5. Перейдите в директорию /opt/iw/tm5 и  и убедитесь в наличии там файла файла iwks_mode.

     

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

    Если файл iwks_mode отсутствует в директории, то его необходимо создать. Для этого введите команду:

    touch iwks_mode

  6. Установите курсор на файл файл iwks_mode и нажмите клавишу F3.
    В зависимости от редакции Системы(Enterprise или  или Standard) на экране должно отобразится содержимое файла iwks_mode:

    • слово "iwall" (оно указывает на тип установки - TME All-in-one: TM+DB server) ;
    • слово "iwtms" (оно указывает на тип установки - TMS All-in-one: TM+DB server).
    Информация
    titleПримечание:

    Если файл имеет другое содержимое:

    1. повторно нажмите F3.

    2. нажмите F4.

    3. в открывшемся окне удалите все символы и, в зависимости от редакции Системы, введите iwall или iwtms

    4. нажмите F2.

    5. в открывшемся окне подтвердите сохранение файла, нажав Save.

    6. нажмите F10.

    7. нажмите F3 и убедитесь в корректности содержимого файла.

    Нажмите

    Нажмите F3.

  7. Введите команду:
    mkdir -p /mnt/rhel-dvd
    Будет создана директория /mnt/rhel-dvd
  8. Убедитесь, что диск с дистрибутивом InfoWatch Traffic Monitor подключен к серверу (см. статью "Обновление Системы", шаг 2).
  9. Введите команду:
    mount /dev/cdrom /mnt/rhel-dvd

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

    Между частями команды "/dev/cdrom" и "/mnt/rhel-dvd" есть пробел.

    Дистрибутивный диск, находящийся в разделе /dev/cdrom, будет подключен в качестве репозитория в директории /mnt/rhel-dvd.

  10. Перейдите в директорию /mnt/rhel-dvd и убедитесь в наличии там файлов и папок. Если директория пуста, повторите шаги 9 и 10.

  11. Перейдите в директорию /etc/yum.repos.d и убедитесь в наличии там файла rhel-dvd.repo (этот файл потребуется для указания пути к файлам обновления).

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

    Ввиду того, что в файловом менеджере алфавитная сортировка, папки стоят раньше файлов (поскольку имеют в начале префикс - дробную черту (/ , слеш)). Поэтому директория /yum.repos.d стоит одной из последних в списке папок, начинающихся с символа дробной черты (/), но до первого файла.

     

    Image Removed

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

    Если файл rhel-dvd.repo отсутствует в директории, то его необходимо создать. Для этого введите команду:

    touch rhel-dvd.repo

  12. Установите курсор на файл rhel-dvd.repo и нажмите F4.
  13. Убедитесь, что файл имеет следующее содержимое:

    [rhel-dvd]
    name=Red Hat Enterprise Linux $releasever - $basearch - DVD
    baseurl=file:///mnt/rhel-dvd/
    enabled=0
    gpgcheck=0

    [rhel-dvd-iwtm]
    name=DVD_IWTM
    baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/Linux/
    enabled=0
    gpgcheck=0

    [rhel-dvd-iwtm-cfdb]
    name=DVD_IW-CFDB
    baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/cfdb/
    enabled=0
    gpgcheck=0

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

    Если текст файла отличается, замените его на указанный.

  14. В параметрах enabled  блоков [rhel-dvd], [rhel-dvd-iwtm] и [rhel-dvd-iwtm-cfdb] замените значения с 0 на 1. Произведенные во время работы изменения БКФ после обновления будут сохранены.
  15. Нажмите F2.
  16. В открывшемся окне подтвердите сохранение файла, нажав Save.
  17. Нажмите F10.
  18. Нажмите F3 и убедитесь в корректности содержимого файла, затем снова нажмите F3 для закрытия файла.

  19. Для выхода из файлового менеджера (требуется для лучшего контроля выполнения команд) введите команду:
    exit
  20. Введите команду для очищения кеша менеджера пакетов:
    yum clean all
  21. Введите команды для остановки перехватчиков:
    service iwtm stop icap
    service iwtm stop smtpd
    service iwtm stop sniffer
    service iwtm stop xapi_xapi
    service iwtm stop Номер установленной версии Traffic Monitor записан в файле /opt/iw/tm5/version.
    В зависимости от версии Traffic Monitor, с которой будет обновляться Система, могут отличаться дальнейшие действия.
  22. Для выхода из файлового менеджера (требуется для лучшего контроля выполнения команд) введите команду:
    exit
Предупреждение
titleВажно!

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

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

 

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

Якорь
Inplace
Inplace

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

В ходе обновления Системы будет также обновлена ОС Red Hat Enterprise Linux до версии 7.x. Для обновления ОС ознакомьтесь с  официальной инструкцией  (доступна на английском языке). 
Крайне рекомендуется выполнить резервное копирование Системы, а также клонировать ее и провести обновление на этой тестовой машине.
Если в Системе используется СУБД Oracle, перед обновлением выполните резервное копирование базы данных. В процессе обновления СУБД Oracle не будет возможности откатить изменения.

Данная инструкция предназначена для обновления InfoWatch Traffic Monitor 6.11.0 и выше.

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

  1. Скопируйте в директорию /root:
    1. Поставляемые в дистрибутиве InfoWatch Traffic Monitor:
      • iwtm-installer-x.x.x.xxx-rhel7.run (где x.x.x.xxx - номер сборки);
      • iwtm-postgresql-9.6.13-x.xx.x.tar.gz;
      • iwtm-oracle-12.2.0.1-x.xx.x.tar.gz;
      • iwtm-adp-x.xx.x.tar.gz.
    2. ISO-образ дистрибутивного диска ОС Red Hat Enterprise Linux 7.x.

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

      Чтобы определить подходящую версию ISO-образа дистрибутивного диска ОС Red Hat Enterprise Linux 7.x, проверьте на официальном сайте версию, до которой поддерживается обновление (статья доступна на английском языке) .

    В нашем примере: 
    • iwtm-installer-6.11.0.839-rhel7.run;
    • iwtm-postgresql-9.6.13-6.11.0.tar.gz;
    • iwtm-oracle-12.2.0.1-6.11.0.tar.gz;
    • iwtm-adp-6.11.0.tar.gz;
    • rhel-server-7.6-x86_64-dvd.iso.
  2. Чтобы сделать файл iwtm-installer-x.x.x.xxx-rhel7.run исполняемым, введите команду:
    chmod u+x /root/iwtm-installer-x.x.x.xxx-rhel7.run

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

    chmod u+x /root/iwtm-installer-6.11.0.839-rhel7.run

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

    При наличии в Системе подсистемы Краулер потребуется приостановить службы указанной подсистемы (на сервере Краулер). Данная процедура выполняется на сервере, где установлена подсистема, стандартными средствами ОС Windows: Пуск - Панель управления - Администрирование - Службы, затем потребуется выделить службу в списке служб и нажать Приостановка службы.

  3. Введите команды для остановки перехватчиков:
    service iwtm stopwait icap
    service iwtm stopwait smtpd
    service iwtm stopwait expressd
    service iwtm stopwait sniffer
    service iwtm stopwait xapi_xapi
    service iwtm stopwait xapi_puppy

  4. Снова введите команду для вызова файлового менеджера:
    mc
  5. Дождитесь, пока обработаются все события, стоящие в очереди на обработку. События, находящиеся в очереди, хранятся в следующих директориях:
    /opt/iw/tm5/queue/analysis/.db/
    /opt/iw/tm5/queue/analysis/.in/
    /opt/iw/tm5/queue/analysis/.out/
    /opt/iw/tm5/queue/db/.db/
    /opt/iw/tm5/queue/db/.in/
    /opt/iw/tm5/queue/db/.out/
    /opt/iw/tm5/queue/smtp/.db/
    /opt/iw/tm5/queue/smtp/.in/
    /opt/iw/tm5/queue/smtp/.out/

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

  1. /opt/iw/tm5/queue/x2x/.db/
    /opt/iw/tm5/queue/x2x/.in/
    /opt/iw/tm5/queue/x2x/.out/

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

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

    До продолжения обновления

настоятельно
  1. настоятельно рекомендуется убедиться в том, что все указанные выше директории пусты. В противном случае нельзя гарантировать успешное обновление и дальнейшую работоспособность Системы.

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

    Чтобы удалить событие, перейдите в нужную директорию в файловом менеджере, установите курсор на планируемом к удалению событии и нажмите F8, затем подтвердите удаление, выбрав в открывшемся окне Yes.

  2. Для выхода из файлового менеджера (требуется для лучшего контроля выполнения команд) введите команду:
    exit
Введите команду для
  1. Для остановки сервисов
сервера
  1. Traffic Monitor введите команду:
    service iwtm stop
Если в Системе используется СУБД Oracle, выполните следующие действия:
Введите команду для остановки СУБД
  1. && chkconfig iwtm off
  2. В зависимости от используемой СУБД и установленной версии Traffic Monitor введите команду для остановки Базы данных:
    • Если используется  СУБД  Oracle:
      • service oracle stop
  • Введите команду для переключения на нужного пользователя:
    su - oracle
  • Введите команду для получения списка установленных в Системе патчей:
    /u01/app/oracle/product/db_1/OPatch/opatch lsinventory | grep "Patch" | grep "applied" Image Removed

    на экране отобразится список патчей, установленных в Системе. Запишите все номера, указанные после слов "Patch" (в другой записи номер патча - это первые восемь цифр после буквы p. Например, номер патча p19972569_112040_Linux-x86-64.zip - это 19972569). Данные номера понадобятся для того, чтобы сверить установленные и необходимые для обновления патчи.

  • Снова введите команду для вызова файлового менеджера:
    mc
  • Перейдите в директорию /mnt/rhel-dvd/infowatch/extras/OraclePatches и убедитесь, что номера патчей, расположенных в директории, входят в список номеров патчей, установленных в Системе (которые вы записали).

    Image Removed

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

    Если какого-либо патча из директории /mnt/rhel-dvd/infowatch/extras/OraclePatches нет в списке установленных, потребуется установить данный патч.

    Перед установкой патча может потребоваться обновить утилиту OPatch. Для этого выполните следующие действия:

    1. Если файловый менеджер Midnight Commander работает, для выхода (требуется для лучшего контроля выполнения команд) введите команду:
      exit
    2. Для создания резервной копии введите команду:
      mv /u01/app/oracle/product/db_1/OPatch /u01/app/oracle/product/db_1/OPatch_backup
    3. Введите команду для извлечения архива с новой версией:
      unzip /mnt/rhel-dvd/infowatch/extras/OraclePatches/p6880880_112000_Linux-x86-64.zip -d /u01/app/oracle/product/db_1
    4. Для предоставления пользователю oracle прав на работу с директорией и файлами введите команду:
      chown oracle:oinstall -R /u01/app/oracle/product/db_1/OPatch

    Для установки патча выполните следующие действия (пример приведен для патча с номером 12345678 - p12345678_112040_Linux-x86-64.zip):

    1. Если файловый менеджер Midnight Commander работает, для выхода (требуется для лучшего контроля выполнения команд) введите команду:
      exit
    2. Введите команду для извлечения патча:
      unzip /mnt/rhel-dvd/infowatch/extras/OraclePatches/p12345678_112040_Linux-x86-64.zip -d /tmp/
    3. Введите команду для перехода в нужную директорию:
      cd /tmp/12345678/
    4. В зависимости от типа патча введите команду для установки:
      • /u01/app/oracle/product/db_1/OPatch/opatch napply . -silent -ocmrf /mnt/rhel-dvd/infowatch/extras/OraclePatches/ocm0.rsp (в случае композитного (составного) патча);
      • /u01/app/oracle/product/db_1/OPatch/opatch apply -silent -ocmrf /mnt/rhel-dvd/infowatch/extras/OraclePatches/ocm0.rsp (в случае одиночного патча).
      Когда патч установится, на экран будет выведено сообщение:  Image Removed
      Нажмите любую клавишу для продолжения.
      Далее следует загрузить измененные файлы SQL в БД.
    5. Введите команду для переключения обратно на пользователя root:
      exit
    6. Введите команду для запуска СУБД Oracle:
      service oracle start
    7. Введите команду для переключения на нужного пользователя:
      su - oracle
    8. К каждой отдельной базе данных, находящейся в данном Oracle home, на который установлен патч, следует подключиться при помощи SQL*Plus. Подключитесь под SYSDBA и запустите скрипт catbundle.sql, для этого выполните команды:

      cd $ORACLE_HOME/rdbms/admin
      sqlplus /nolog
      CONNECT / AS SYSDBA
      @catbundle.sql cpu apply
      QUIT
      Выполнение скрипта catbundle.sql отображается в представлении dba_registry_history в виде записи о пакете обновлений (PSU).

    9. Введите команды для удаления более ненужных файлов:
      cd /tmp/ && rm -rf /tmp/12345678/ && rm -f /tmp/PatchSearch.xml

    Более подробную информацию по установке можно найти в файле README, расположенном для каждого патча в директории с его именем.

  • Если файловый менеджер Midnight Commander работает, для выхода (требуется для лучшего контроля выполнения команд) введите команду:
    exit
  • Введите команду для переключения обратно на пользователя root:
    exit
  • Если СУБД не запускалась в процессе установки патчей, введите команду для запуска СУБД Oracle:
    service oracle start
  • В зависимости от используемой СУБД введите команду для запуска процесса обновления пакетов:
    yum upgrade --exclude=iwtm-rtl-pg,iwtm-siem-pg (если используется СУБД Oracle)
    yum upgrade --exclude=iwtm-rtl-oracle,iwtm-siem-oracle (если используется СУБД PostgreSQL)
    Перед загрузкой нужных для установки пакетов будет выведен запрос вида Image Removed. Для продолжения наберите Y на клавиатуре и нажмите Enter.
    Начнется скачивание пакетов из репозитория, а затем - установка пакетов. Это может занять некоторое время.
    Image Removed
        • && chkconfig oracle off
      • Если используется  СУБД  PostgreSQL:

        • service postgresql-9.4 stop && chkconfig postgresql-9.4 off (для версии Traffic Monitor 6.9.x)
        • service postgresql-9.6 stop && chkconfig postgresql-9.6 off (для версии Traffic Monitor 6.10.x)
    1.  В зависимости от  установленной версии Traffic Monitor введите команду: 
      • service php-fpm stop && chkconfig php-fpm off (для версии Traffic Monitor 6.9.x)
      • service iwtm-php-fpm stop && chkconfig iwtm-php-fpm off (для версии Traffic Monitor 6.10.x)
    2. Введите команды для остановки служб:
      service redis stop && chkconfig redis off
      service nginx stop && chkconfig nginx off
      service gearmand stop && chkconfig gearmand off
      service nagios stop && chkconfig nagios off
    3. Если в Системе установлен Traffic Monitor версии 6.10.x, введите команду для остановки службы:
      service iwtm-consul stop && chkconfig iwtm-consul off
    4. Для обновления пакетов введите команду:
      yum upgrade --exclude=nagios

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

      Для выполнения команды на данном этапе должны быть подключены репозитории Red Hat Enterprise Linux 6 с последними обновлениями.

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

      Будет выведен запрос вида:
      Image Added
      Для продолжения наберите Y на клавиатуре и нажмите Enter.

    5. После завершения обновления пакетов введите команду для перезагрузки сервера:
      reboot
      Дождитесь загрузки сервера и повторно авторизуйтесь, выполнив действия 1-3 инструкции перед обновлением.
    6. Чтобы установить вспомогательные утилиты для обновления, введите команду:
      yum -y install yum-utils redhat-upgrade-tool preupgrade-assistant preupgrade-assistant-ui preupgrade-assistant-el6toel7
      Дождитесь завершения установки утилит.
    7. Для отключения репозиториев введите команду:
      yum-config-manager --disable \*

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

    9. Удалите или отключите репозитории Red Hat Enterprise Linux 6:

      • Для удаления репозиториев:
        1. Введите команду для вызова файлового менеджера:
          mc
        2. Перейдите в директорию /etc/yum.repos.d/;
        3. Откройте конфигурационные файлы репозиториев Red Hat Enterprise Linux 6;
          В параметрах baseurl содержатся адреса директорий локальных репозиториев;
        4. Удалите эти директории вместе со всем содержимым, затем удалите конфигурационные файлы в директории /etc/yum.repos.d/;
        5. Для выхода из файлового менеджера введите команду:
          exit
      • Для отключения репозитория выполните одно из действий:
        • Откройте находящийся в директории /etc/yum.repos.d/ конфигурационный файл репозитория на редактирование, в параметре enabled замените значение 1 на 0 и сохраните изменения;
        • Удалите в директории /etc/yum.repos.d/ конфигурационный файл репозитория.
    10. Для запуска утилиты, проверяющей систему перед обновлением, введите команду:
      preupg -v Будет выведен запрос вида: Image Added

    11. Для продолжения наберите Y на клавиатуре и нажмите Enter.
    12. Дождитесь завершения работы утилиты. Результаты проверки содержатся в отчете /root/preupgrade/result.html, сформированном утилитой.
      Выполните рекомендации, указанные в отчете, для этого ознакомьтесь с пунктом 1.1.3.3 официальной инструкции (доступна на английском языке).
    13. Удалите пакет dkms, выполнив команду:

      rpm -ev --nodeps dkms

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

      Невыполнение данного действия может привести к ошибке обновления ОС.

    14. Для запуска утилиты обновления, введите команду:
      redhat-upgrade-tool --iso /root/rhel-server-7.x-x86_64-dvd.iso (где 7.x - версия ОС Red Hat Enterprise Linux, до которой будет обновлена система)

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

      redhat-upgrade-tool --iso /root/rhel-server-7.6-x86_64-dvd.iso
      Будет выведен запрос вида:
      Image Added
      Для продолжения наберите Y на клавиатуре и нажмите Enter.
      В результате будет выведено сообщение:
      Image Added

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

      Если ОС Red Hat Enterpise Linux обновляется до версии выше 7.6, может быть выведено сообщение вида:

      Image Added

      Сообщение информирует о том, что на данный момент ОС не поддерживает обновление до выбранной версии. В этом случае используйте ISO-образ дистрибутивного диска ОС Red Hat Enterprise Linux версии, указанной в конце сообщения.

    15. Введите команду для перезагрузки сервера:
      reboot
      После перезагрузки сервера обновление продолжится автоматически.
    16. Дождитесь загрузки обновленной системы и повторно авторизуйтесь, выполнив действия 1-3 инструкции перед обновлением.
    17. Для обновления конфигурации почтового сервера Postfix введите команду:
      postfix upgrade-configuration
    18. Введите команду для поиска и вывода на экран консоли списка файлов с расширением .rpmnew

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

    warning
    1. Информация
      title
    Важно!

    Если в Системе используется СУБД PostgreSQL, при обновлении с версии 6.0 или 6.1 до 6.5 и более новых обязательно выполните следующие действия:

    Multiexcerpt include
    MultiExcerptNameRU
    PageWithExcerptОбъединение конфигурационных файлов

  • Снова введите команду для вызова файлового менеджера:
    mc
  • Перейдите в директорию opt/iw/tm5/etc/scripts/ и убедитесь в наличии файла iwssid.lua.upgrade.
  • Файл рекомендуется оставить без изменений, если выполнено по крайней мере одно из условий:
    • обновление Системы ведется с версии 6.9;
    • до обновления файл iwssid.lua не редактировался.
    В противном случае его необходимо корректно объединить с конфигурационным файлом iwssid.lua (см. статью "Объединение конфигурационных файлов").
  • В зависимости от используемой СУБД перейдите в директорию:
    • /opt/iw/tm5/csw/oracle (если используется СУБД Oracle);
    • /opt/iw/tm5/csw/postgres (если используется СУБД PostgreSQL).
  • Выделите файл database.conf.
    Image Removed
  • Нажмите F3.
  • Убедитесь, что для параметра \set schema_version указана версия, до которой происходит обновление. Если указана старая версия, повторите шаги 27 - 36.
  • Нажмите F3.
  • Для выхода из файлового менеджера (требуется для лучшего контроля выполнения команд) введите команду:
    exit
  • Последовательно введите команды для остановки служб:
    service iwtm stop
    service iwtm-php-fpm stop
    service nagios stop

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

    При наличии в Системе подсистемы Краулер потребуется приостановить службы указанной подсистемы (на сервере Краулер). Данная процедура выполняется на сервере, где установлена подсистема, стандартными средствами ОС Windows: Пуск - Панель управления - Администрирование - Службы, затем потребуется выделить службу в списке служб и нажать Приостановка службы.

  • Если в Системе используется СУБД PostgreSQL, выполните Обновление СУБД PostgreSQL.
  • В зависимости от используемой СУБД введите команду для переключения на нужного пользователя:
    • su - oracle - для переключения на пользователя oracle (если в Системе используется СУБД Oracle)
    • su - postgres - для переключения на пользователя postgres (если в Системе используется СУБД PostgreSQL)
  • В зависимости от используемой СУБД введите команду для перехода в нужную директорию:
    • cd /opt/iw/tm5/csw/oracle - (если в Системе используется СУБД Oracle)
    • cd /opt/iw/tm5/csw/postgres - (если в Системе используется СУБД PostgreSQL)
  • Введите команду для запуска скрипта (сценария) обновления БД:
    ./update.sh

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

    Image Removed

  • Введите команду для очистки кеша:

    redis-cli flushall
  • Введите команду для переключения обратно на пользователя root:

    exit

  • Снова введите команду для вызова файлового менеджера:
    mc
  • Перейдите в директорию /etc/yum.repos.d, установите курсор на файл rhel-dvd.repo и нажмите F4.
  • В параметрах enabled блоков [rhel-dvd], [rhel-dvd-iwtm] и [rhel-dvd-iwtm-cfdb] замените значения с 1 на 0.
  • Нажмите F2.
  • В открывшемся окне подтвердите сохранение файла, нажав Save.
  • Нажмите F10.
  • Нажмите F3 и убедитесь в корректности содержимого файла, затем снова нажмите F3 для закрытия файла.

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

  • Введите команду для перезагрузки сервера:
    reboot
  • Дождитесь загрузки сервера и повторите шаги 2 и 3 данной инструкции для входа в консоль.
  • Введите команду для проверки запуска процессов:
    service iwtm status
    На экране отобразится список процессов и их статус. Обычно сервисы iw_qmover_client, iw_qmover_server и iw_image2test_fre_batch бывают остановлены, а все остальные сервисы - запущены, при этом строки должны заканчиваться фразой "is stopped (disabled)..." для сервисов iw_qmover_client, iw_qmover_server и iw_image2test_fre_batch и фразой "is running..." для всех остальных сервисов:
    Image Removed

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

    При наличии в Системе подсистемы Краулер потребуется запустить службы указанной подсистемы (на сервере Краулер). Данная процедура выполняется на сервере, где установлена подсистема, стандартными средствами ОС Windows: Пуск - Панель управления - Администрирование - Службы, затем потребуется выделить службу в списке служб и нажать Запуск службы.

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

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

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

    Sv translation
    languageen

    The update will be done through a console of the server being updated. A console (or a terminal) is a window of a Linux-based operating system where you can type commands in a text form - as strings. Depending on the server type, when started, the console may display general information on the server and an invitation to log in or just an invitation to log in without general information. In any case, you have to enter the user login that will be used for working the console.

    The console looks as follows:

    Image Removed

    To update the System, perform the following actions:

  • 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 Launch Virtual Machine Console command (see an example below).
      Image Removed A window with the server console will open.
  • In the Login as: (or login: - depending on the server type) line, enter root and press Enter.
    Image Removed
  • In the root@<server_address>'s password: (or Password: - depending on the server type) line, enter a password of the root user (superuser) and press Enter.
    Please, note that nothing is displayed in the line while typing.
    Image Removed
    The screen will display the service information and (in the last line) an invitation to enter the command (command line).

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

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

    If you connect remotely via SSH, it is recommended using the Screen utility. Thus you can avoid problems in case of lost connection with updating server. When disconnecting from the utility, all the prcocesses started are not to be interrupted and you may safely continue the System update.

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

    Basic commands:

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

    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.

  • Go to the /opt/iw/tm5 directory and make sure that it contains iwks_mode file.
    Image Removed

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

    If iwks_mode file is missing in the directory, you need to create it. For this, enter the command:

    touch iwks_mode

  • Position the cursor on the iwks_mode fine and press F3.
    Depending on the System edition (Enterprise or Standard) the content of iwks_mode file will be displayed on the screen:
    • "iwall" word (indicates that the installation type is TME All-in-one: TM+DB server)  Image Removed ;
    • "iwtms" word (indicates that the installation type is TMS All-in-one: TM+DB server) Image Removed .

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

      If the file content is different:

      1. press F3 again.

      2. press F4.

      3. in the window that opens, delete all characters and depending on the System edition, enter iwall or iwtms

      4. press F2.

      5. in the window that opens, confirm the file saving by clicking Save.

      6. press F10.

      7. press F3 and make sure that the file content is correct.

  • Press F3.
  • Enter the command:
    mkdir -p /mnt/rhel-dvd 
    The /mnt/rhel-dvd directory will be created.
  • Make sure that a distribution disk with InfoWatch Traffic Monitor is connected to the server (see "Обновление Системы", step 2).
  • Enter the command:
    mount /dev/cdrom /mnt/rhel-dvd

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

    There is a space between 2 commands "/dev/cdrom" and "/mnt/rhel-dvd".

    The distribution disk, located in the /dev/cdrom section will be connected as a repository in the /mnt/rhel-dvd directory.

  • Go to /mnt/rhel-dvd directory and make sure that it contains files and folders. If the directory is empty, repeat steps 9 and 10.
  • Go to the /etc/yum.repos.d directory and make sure that it contains rhel-dvd.repo file (this file is required to specify the path to the update files).

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

    Taking into account, that in the file manager the elements are sorted in the alphabetic order, folders precede files (as they begin with a slash (/)). So the /yum.repos.d directory is one of the last in the last of folders list which begin with "/", but is before the first file .

    Image Removed

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

    If rhel-dvd.repo file is missing in the directory, you need to create it. To do this, enter the command:

    touch rhel-dvd.repo

  • Position the cursor on the rhel-dvd.repo file and press F4.
  • Make sure the file content includes the following text:

    [rhel-dvd]
    name=Red Hat Enterprise Linux $releasever - $basearch - DVD
    baseurl=file:///mnt/rhel-dvd/
    enabled=0
    gpgcheck=0

    [rhel-dvd-iwtm]
    name=DVD_IWTM
    baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/Linux/
    enabled=0
    gpgcheck=0

    [rhel-dvd-iwtm-cfdb]
    name=DVD_IW-CFDB
    baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/cfdb/
    enabled=0
    gpgcheck=0

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

    If the text of the file is different, replace it with the specified one.

  • In the [rhel-dvd],[rhel-dvd-iwtm] and [rhel-dvd-iwtm-cfdb] blocks, change the values of the enabled parameter from 0 to 1. The changes in content filtration base, implemented during the operation are to be saved after the update.
  • Press F2.
  • In the window that opens, confirm the file saving by clicking Save.
  • Press F10.
  • Press F3 and make sure that the file content is correct, then press F3 again to close the file.

  • To exit the file manager (is required to better control command execution), enter the command:
    exit
  • Enter the command to clean the package manager cache:
    yum clean all
  • Enter commands to stop the interceptors:
    service iwtm stop icap 
    service iwtm stop smtpd 
    service iwtm stop expressd 
    service iwtm stop sniffer 
    service iwtm stop xapi_xapi 
    service iwtm stop xapi_puppy
  • Enter the command to call the file manager again:
    mc
  • Wait until all events which are in the queue for processing are processed. Events in the queue are located in the following directories:
    opt/iw/tm5/queue/analysis/.db/
    opt/iw/tm5/queue/analysis/.in/
    opt/iw/tm5/queue/analysis/.out/
    opt/iw/tm5/queue/db/.db/
    opt/iw/tm5/queue/db/.in/
    opt/iw/tm5/queue/db/.out/
    opt/iw/tm5/queue/smtp/.db/
    opt/iw/tm5/queue/smtp/.in/
    opt/iw/tm5/queue/smtp/.out/
    When all the events are processed, these directories will be empty.

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

    To continue the update, make sure that all specified directories are empty. Otherwise, we cannot guarantee that the System will be updated correctly and will operate properly after the update.

    If for some reason, you cannot wait until the processing is complete, you can delete events from the queue; these events will be completely removed from the System.

    To delete the event, go to the required directory in the file manager, position the cursor on the event you want to delete and press F8. Then, confirm the deletion by clicking Yes in the confirmation window that opens.

  • To exit the file manager (is required to better control command execution), enter the command:
    exit
  • To stop services of Traffic Monitor server, enter the command:
    service iwtm stop
  • If Oracle DBMS is used in the System, do the following actions:
    1. Enter the command to stop DBMS Oracle:
      service oracle stop
    2. Enter the command to switch to the desired user:
      su - oracle
    3. Enter the command to get the list of patches installed in the System:
      /u01/app/oracle/product/db_1/OPatch/opatch lsinventory | grep "Patch" | grep "applied"

      Image Removed
      The screen will display the list of patches installed in the System. Write down or remember all numbers specified after the word "Patch" (the patch number can also be the first eight digits after the letter "p". For example, for p19972569_112040_Linux-x86-64.zip the patch number is 19972569). There numbers are required to compare installed patches and patches that are needed for the update.
    4. Enter the command to call the file manager again:
      mc
    5. Go to the /mnt/rhel-dvd/infowatch/extras/OraclePatches directory and make sure that patch numbers in the directory are in the list of patch numbers installed in the System (which you have written down or remembered).
      Image Removed

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

      If any patch from /mnt/rhel-dvd/infowatch/extras/OraclePatches directory is not in the list of installed patches, you need to install this patch.

      Before installing the patch, OPatch utility is required to be updated. The following actions are to be taken to do that:

      1. If Midnight Commander file manager is running, to exit it (is required for better control command execution) enter the command:
        exit
      2. To make a backup copy, enter the command:
        mv /u01/app/oracle/product/db_1/OPatch /u01/app/oracle/product/db_1/OPatch_backup
      3. To extract the archive with a new version, enter the command:
        unzip /mnt/rhel-dvd/infowatch/extras/OraclePatches/p6880880_112000_Linux-x86-64.zip -d /u01/app/oracle/product/db_1
      4. To grant the oracle user rights for operating the directory and files, enter the command:
        chown oracle:oinstall -R /u01/app/oracle/product/db_1/OPatch

      To install the patch, the following actions are to be taken (below you can see the example of patch number 12345678 - p12345678_112040_Linux-x86-64.zip):

      1. If Midnight Commander file manager is running, to exit it (is required for better control command execution) enter the command:
        exit
      2. Enter the command to extract the patch:
        unzip /mnt/rhel-dvd/infowatch/extras/OraclePatches/p12345678_112040_Linux-x86-64.zip -d /tmp/
      3. To go to the required directory, enter the command:
        cd /tmp/12345678/
      4. In accordance with patch type, enter the command to install the patch :
        • /u01/app/oracle/product/db_1/OPatch/opatch napply . -silent -ocmrf /mnt/rhel-dvd/infowatch/extras/OraclePatches/ocm0.rsp (in case of composite patch);
        • /u01/app/oracle/product/db_1/OPatch/opatch apply -silent -ocmrf /mnt/rhel-dvd/infowatch/extras/OraclePatches/ocm0.rsp (in case of a single patch).

        When the patch is installed, the screen will display the message:  Image Removed
        Press any key to continue.

        Then, the changed SQL files should be downloaded into DB.

      5. Enter the command to switch to the root user again:
        exit
      6. Enter the command to start the Oracle DBMS:
        service oracle start
      7. Enter the command to switch to the required user:
        su - oracle
      8. In each separate base within the Oracle home, where the patch is installed it is required switching using SQL*Plus. Login as SYSDBA and run the script catbundle.sql, to do this the following command are to be entered:
        cd $ORACLE_HOME/rdbms/admin
        sqlplus /nolog
        CONNECT / AS SYSDBA
        @catbundle.sql cpu apply
        QUIT
        The catbundle.sql script running is displayed within the dba_registry_history as package set updates (PSU).
      9. To delete the files that are no more needed, enter the command:
        cd /tmp/ && rm -rf /tmp/12345678/ && rm -f /tmp/PatchSearch.xml

      Details on the installation can be found within the README file, located in a specific directory named after each patch.

    6. If Midnight Commander file manager is running, exit it (required for better command execution control) with the command:
      exit
    7. to switch back to the root user, enter the command:
      exit
    8. to start Oracle DBMS, enter the command:
      service oracle start
  • Depending on the DBMS used, enter the command to start the packages update process:                                                                                 
  • yum upgrade --exclude=iwtm-rtl-pg,iwtm-siem-pg (if Oracle DBMS is used)

  • yum upgrade --exclude=iwtm-rtl-oracle,iwtm-siem-oracle  (if PostgreSQL DBMS  is used)
  • Before loading the files required for installation, the screen will display a request as follows:  Image Removed. To continue, type Y and press Enter.
    Downloading packages from the repository and then installing the packages will begin. This may take some time.
    Image Removed

     

  • Enter the command within the file manager to find and display the list of files with .rpmnew extension
    1. Примечание:

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

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

      Не вносите изменения в файлы web.conf , database.conf , consul.json . Также рекомендуется не менять файл /etc/nagios/nagios.cfg .

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

    3. Введите команду для перехода в директорию c дистрибутивами Traffic Monitor:
      cd /root
    4. Если в Системе используется СУБД Oracle:
      1. Введите команду для запуска Oracle:
        service oracle start
      2. Введите команду для запуска обновления Oracle:
        bash ./iwtm-installer-x.x.x.xxx-rhel7.run -- --oracle-upgrade

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

        bash ./iwtm-installer-6.11.0.839-rhel7.run -- --oracle-upgrade
        После успешного обновления Oracle, будет выведено сообщение вида:
        Image Added

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

        Обновление СУБД Oracle может занять длительное время.
        Пример для базы данных объемом 1 ТB:

        • обновление СУБД Oracle - 60 минут;
        • обновление схемы базы данных - 50 минут.

        Для обновления необходимо обеспечить 11 GB свободного пространства в ORACLE_HOME, по умолчанию директория /u01/app/oracle.

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

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

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

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

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

      3. Для преобразования файла паролей в формат Oracle 12 введите команду:
        su - oracle -c "orapwd file=${ORACLE_HOME}/dbs/orapwiwtm force=y format=12 input_file=${ORACLE_HOME}/dbs/orapwiwtm"

         

    5. Для запуска обновления пакетов Traffic Monitor введите команду:
      bash ./iwtm-installer-x.x.x.xxx-rhel7.run

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

      bash ./iwtm-installer-6.11.0.839-rhel7.run
      Перед запуском установщик выполнит проверку Системы и, если будет обнаружено несоответствие требованиям, прервет обновление, выведя сообщение об ошибке.
      В этом случае необходимо исправить указанное установщиком несоответствие и повторно запустить обновление.
      В открывшемся окне, оповещающем о том, что найдена более ранняя версия InfoWatch Traffic Monitor, выберите Update и нажмите Enter:
      Image Added

    6. Если в Системе используется СУБД PostgreSQL и Traffic Monitor обновлялся с версии 6.9.x:
      1. Выполните Обновление СУБД PostgreSQL.

      2. Для переключения на пользователя postgres введите команду:
        su - postgres
      3. Введите команду для запуска скрипта (сценария) обновления схемы БД:
        bash /opt/iw/tm5/csw/postgres/update.sh

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

        Обновление схемы базы данных может занять длительное время.

        Пример: для базы данных объемом 1 ТB - 95 минут.

        Для обновления необходимо обеспечить 12 GB свободного пространства корневом каталоге системы.

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

    7. Введите команду для поиска и вывода на экран консоли списка файлов с расширением .rpmnew:

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

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

      Не вносите изменения в файлы web.conf, database.conf, consul.json . Также рекомендуется не менять файл /etc/nagios/nagios.cfg .

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

    9. Перейдите в директорию /opt/iw/tm5/etc/scripts/ и убедитесь в наличии файла iwssid.lua.upgrade.
      Файл iwssid.lua.upgradeне используется Системой, он служит источником информации для восстановления работоспособности Системы в случае ее глубокой кастомизации.
    10. Также в директории /opt/iw/tm5/etc/scripts/ должен быть файл iwssid.lua , его рекомендуется оставить без изменений, если до обновления он не редактировался.
      В противном случае его необходимо корректно объединить с конфигурационным файлом iwssid.lua.rpmnew (см. статью "Объединение конфигурационных файлов").
    11. Для выхода из файлового менеджера:
      exit
    12. Введите команду для перезагрузки сервера:
      reboot
      Дождитесь загрузки сервера и повторно авторизуйтесь, выполнив действия 1-3 инструкции перед обновлением.

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

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

    13. Введите команду для удаления пакетов от Red Hat Enterprise Linux 6:
      yum remove *.el6*

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

      Перед удалением будет выведен список удаляемых пакетов и запрос подтверждения. Обязательно проверьте список на наличие пакетов, имя которых начинается с " iwtm- ". В случае обнаружения таких пакетов отмените удаление и пропустите это действие.

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

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

      yum clean all

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

    16. Введите команду для проверки запуска процессов:
      iwtm status 
      На экране отобразится список процессов и их статус. Обычно сервисы iw_qmover_client,  iw_qmover_server и iw_image2text_fre_batch бывают остановлены, а все остальные сервисы - запущены, при этом строки должны заканчиваться фразой "inactive (dead)" для сервисов iw_qmover_client, iw_qmover_server и iw_image2text_fre_batch и фразой "active (running)" для всех остальных сервисов:
      Image Added

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

      При наличии в Системе подсистемы Краулер потребуется запустить службы указанной подсистемы (на сервере Краулер). Данная процедура выполняется на сервере, где установлена подсистема, стандартными средствами ОС Windows: Пуск - Панель управления - Администрирование - Службы, затем потребуется выделить службу в списке служб и нажать Запуск службы.

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

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

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

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

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

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

    Якорь
    Backup
    Backup

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

    Крайне рекомендуется выполнить резервное копирование Системы, а также клонировать ее и провести обновление на этой тестовой машине.
    Если в Системе используется СУБД Oracle, перед обновлением выполните резервное копирование базы данных. В процессе обновления СУБД Oracle не будет возможности откатить изменения.

    В ходе обновления Системы будет установлена ОС Red Hat Enterprise Linux версии 7.x.
    После перехода Системы на ОС Red Hat Enterprise Linux 7.x конфигурационные файлы Traffic Monitor необходимо будет настроить заново. Рекомендуется сохранить их для повторной настройки после обновления.

    В процессе обновления Системы будет выполнено:

        1. Резервное копирование БД, индексов, конфигурации службы iw_adlibitum (Подготовка к обновлению).
        2. Установка ОС Red Hat Enterprise Linux 7.x (Выполняется пользователем по официальной инструкции).
        3. Установка InfoWatch Traffic Monitor 6.11.
        4. Восстановление данных из резервных копий и обновление СУБД.
    Информация
    titleПримечание:

    При наличии в Системе подсистемы Краулер потребуется приостановить службы указанной подсистемы (на сервере Краулер). Данная процедура выполняется на сервере, где установлена подсистема, стандартными средствами ОС Windows: Пуск - Панель управления - Администрирование - Службы, затем потребуется выделить службу в списке служб и нажать Приостановка службы.

    1. Введите команды для остановки перехватчиков и службы iw_indexer:
      service iwtm stopwait icap
      service iwtm stopwait smtpd
      service iwtm stopwait expressd
      service iwtm stopwait sniffer
      service iwtm stopwait xapi_xapi
      service iwtm stopwait xapi_puppy
      service iwtm stopwait indexer

    2. Снова введите команду для вызова файлового менеджера:
      mc
    3. Дождитесь, пока обработаются все события, стоящие в очереди на обработку. События, находящиеся в очереди, хранятся в следующих директориях:
      /opt/iw/tm5/queue/analysis/.db/
      /opt/iw/tm5/queue/analysis/.in/
      /opt/iw/tm5/queue/analysis/.out/
      /opt/iw/tm5/queue/db/.db/
      /opt/iw/tm5/queue/db/.in/
      /opt/iw/tm5/queue/db/.out/
      /opt/iw/tm5/queue/smtp/.db/
      /opt/iw/tm5/queue/smtp/.in/
      /opt/iw/tm5/queue/smtp/.out/
      /opt/iw/tm5/queue/x2x/.db/

      /opt/iw/tm5/queue/x2x/.in/
      /opt/iw/tm5/queue/x2x/.out/

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

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

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

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

      Чтобы удалить событие, перейдите в нужную директорию в файловом менеджере, установите курсор на планируемом к удалению событии и нажмите F8, затем подтвердите удаление, выбрав в открывшемся окне Yes.

    4. Для выхода из файлового менеджера (требуется для лучшего контроля выполнения команд) введите команду:
      exit 
    5. Для остановки сервисов Traffic Monitor введите команду:
      service iwtm stop && chkconfig iwtm off
    6. В зависимости от установленной версии Traffic Monitor введите команду:
      • service php-fpm stop && chkconfig php-fpm off (для версии Traffic Monitor 6.9.x)
      • service iwtm-php-fpm stop && chkconfig iwtm-php-fpm off (для версии Traffic Monitor 6.10.x)
    7. Подключитесь к Базе данных и проверьте количество содержащихся в ней событий:
      1. Раскрыть
        titleДля СУБД Oracle
        1. Чтобы подключиться к серверу БД, из консоли введите команды:
          su - oracle
          sqlplus <данные_владельца_схемы> где <данные_владельца_схемы> - логин и пароль владельца схемы базы данных. С данными по умолчанию можно ознакомиться на странице Предустановленные серверные параметры.
          В нашем примере:
          su - oracle
          sqlplus iwtm/xxXX1234

        2. Далее введите команду:
          select count(1) from object;
        3. Для отключения от БД введите команду:
          exit

        4. Для переключения на нужного пользователя введите команду:
          exit

      2. Раскрыть
        titleДля СУБД PostgreSQL
        1. Чтобы подключиться к серверу БД, из консоли введите команды:
          su - iwtm
          psql postgres iwtm -p 5433

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

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

    8. Для остановки процессов searchd введите команду:
      killall searchd
      Для проверки введите команду:
      ps -ef | grep searchd | grep -v grep
      В выводе команды не должно быть запущенных процессов.
    9. Выполните резервное копирование:

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

      Для успешного восстановления файлы обязательно должны быть скопированы с сохранением их прав, пользователей и групп.
      Для этого копируйте файлы только на файловую систему Linux (например, Ext4 или XFS).
      Храните резервные копии либо на другом разделе сервера, либо на другом сервере, либо на внешнем устройстве. Будьте уверены, что данные не будут потеряны при установке ОС Red Hat Enterprise Linux 7.x.
      После установки резервные копии будет необходимо скопировать по адресам исходных файлов.

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

        • Если используется СУБД Oracle:

          • service oracle stop && chkconfig oracle off
        • Если используется СУБД PostgreSQL:

          • service postgresql-9.4 stop && chkconfig postgresql-9.4 off (для версии Traffic Monitor 6.9.x)
          • service postgresql-9.6 stop && chkconfig postgresql-9.6 off (для версии Traffic Monitor 6.10.x)
      2. Создайте резервную копию Базы данных. По умолчанию База данных расположена в директориях  /u01, /u02  и т.д.
        Скопируйте Базу данных либо на другой раздел сервера, либо на другой сервер, либо на внешнее устройство.

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

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

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

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

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

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

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

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

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

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

    10. Установите на сервер ОС Red Hat Enterprise Linux 7.x. Для установки ознакомьтесь с официальной инструкцией (доступна на английском языке).
    11. Установите Traffic Monitor версии 6.11.

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

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

    12. Для остановки служб введите команды:
      iwtm stop
      service iwtm-php-fpm stop
      service nagios stop
    13. В зависимости от используемой СУБД введите команду для остановки Базы данных:

      • service oracle stop (для СУБД Oracle)

      • service postgresql-9.6 stop (для СУБД PostgreSQL)
    14. Для остановки процессов searchd введите команду:
      killall searchd
      Для проверки введите команду:
      ps -ef | grep searchd | grep -v grep
      В выводе команды не должно быть запущенных процессов.
    15. Скопируйте созданную в действии 9b резервную копию Базы данных таким образом, чтобы расположение соответствовало исходной.
    16. При использовании СУБД Oracle проверьте, чтобы идентификаторам uid (пользователя oracle) и gid (группы oinstall) было установлено значение 1001:
      1. Узнайте значения идентификаторов uid и gid, выполните команду:
        id oracle
      2. Проверьте права на директории /u01 и /u02:
        ls -l /u01
        ls -l /u02
      3. В случае некорректных прав, выполните поиск и замену всех таких прав данного владельца в директориях и файлах:
        find /u01 -uid 501 -exec chown -v -h 1001 '{}' \;
        find /u01 -gid 501 -exec chgrp -v 1001 '{}' \;
        find /u02 -uid 501 -exec chown -v -h 1001 '{}' \;
        find /u02 -gid 501 -exec chgrp -v 1001 '{}' \;
    17. Введите команду для перехода в директорию c дистрибутивами Traffic Monitor:
      cd /root
    18. Обновите СУБД:
      1. Раскрыть
        titleДля СУБД Oracle
        1. Введите команду для запуска Oracle:
          service oracle start
        2. Введите команду для запуска обновления Oracle:
          bash ./iwtm-installer-x.x.x.xxx-rhel7.run -- --oracle-upgrade

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

          bash ./iwtm-installer-6.11.0.630-rhel7.run -- --oracle-upgrade
          После успешного обновления Oracle, будет выведено сообщение вида:
          Image Added

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

          Обновление СУБД Oracle может занять длительное время.
          Пример для базы данных объемом 1 ТB:

          • обновление СУБД Oracle - 60 минут;
          • обновление схемы базы данных - 50 минут.

          Для обновления необходимо обеспечить 11 GB свободного пространства в ORACLE_HOME, по умолчанию директория /u01/app/oracle.

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

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

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

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

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

        3. Введите команду для перехода в директорию со скриптом (сценарием) обновления схемы БД:
          cd /opt/iw/tm5/csw/oracle

        4. Введите команду для запуска скрипта:
          su --command "/opt/iw/tm5/csw/oracle/update.sh" oracle

        5. Для преобразования файла паролей в формат Oracle 12 введите команду:
          su - oracle -c "orapwd file=${ORACLE_HOME}/dbs/orapwiwtm force=y format=12 input_file=${ORACLE_HOME}/dbs/orapwiwtm"

      2. Раскрыть
        titleДля СУБД PostgreSQL
        1. Если Система обновляется с версии 6.9.x:
          1. Выполните Обновление СУБД PostgreSQL.
          2. Введите команду для запуска скрипта (сценария) обновления схемы БД:
            su --command "/opt/iw/tm5/csw/postgres/update.sh" postgres

        2. Если Система обновляется с версии 6.10.x:
          1. Введите команду для запуска PostgreSQL:
            service postgresql-9.6 start
          2. Выполните команду:
            su --command "/usr/pgsql-9.6/bin/psql -d postgres -p 5433 -f /opt/iw/tm5/etc/update_psql_commands" postgres
          3. Введите команду для перехода в директорию со скриптом (сценарием) обновления схемы БД :
            cd /opt/iw/tm5/csw/postgres
          4. Введите команду для запуска скрипта:
            su --command "/opt/iw/tm5/csw/postgres/update.sh" postgres

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

            Обновление схемы базы данных может занять длительное время.

            Пример: для базы данных объемом 1 ТB - 95 минут.

            Для обновления необходимо обеспечить 12 GB свободного пространства корневом каталоге системы.

    19. Выполните действие 7 данной инструкции, чтобы сравнить количество событий в Базе данных до и после обновления.
    20. Скопируйте созданные в действиях 9b и 9c резервные копии таким образом, чтобы расположение соответствовало исходным директориям и файлам.
      Если исходное расположение не являлось расположением по умолчанию, его необходимо будет указать в соответствующих разделах конфигурационных файлов (см. действия 10b и 10c).
    21. Выполните команды:
      sudo -u iwtm touch /opt/iw/tm5/www/backend/protected/runtime/first_run
      iwtm restart kicker
    22. Введите команду для перезагрузки сервера:
      reboot
      Дождитесь загрузки сервера и повторно авторизуйтесь, выполнив действия 1-3 инструкции перед обновлением.
    23. Введите команду для очистки кеша:

      redis-cli flushall
    24. Введите команду для проверки запуска процессов:
      iwtm status 
      На экране отобразится список процессов и их статус. Обычно сервисы iw_qmover_client,  iw_qmover_server и iw_image2text_fre_batch бывают остановлены, а все остальные сервисы - запущены, при этом строки должны заканчиваться фразой "inactive (dead)" для сервисов iw_qmover_client,iw_qmover_server и iw_image2text_fre_batch и фразой "active (running)" для всех остальных сервисов:
      Image Added

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

    При наличии в Системе подсистемы Краулер потребуется запустить службы указанной подсистемы (на сервере Краулер). Данная процедура выполняется на сервере, где установлена подсистема, стандартными средствами ОС Windows: Пуск - Панель управления - Администрирование - Службы, затем потребуется выделить службу в списке служб и нажать Запуск службы.

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

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

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

    Раскрыть
    titleОбновление Системы с версии 6.11.xx до 6.11.yy

    Якорь
    In_Version
    In_Version

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

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

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

    1. Скопируйте в директорию /root файлы, поставляемые в дистрибутиве InfoWatch Traffic Monitor:
      • iwtm-installer-x.x.x.xxx-rhel7.run (где x.x.x.xxx - номер сборки);
      • iwtm-postgresql-9.6.13-x.xx.x.tar.gz;
      • iwtm-oracle-12.2.0.1-x.xx.x.tar.gz;
      • iwtm-adp-x.xx.x.tar.gz.
      В нашем примере: 
      • iwtm-installer-6.11.2.1032-rhel7.run;
      • iwtm-postgresql-9.6.13-6.11.2.tar.gz;
      • iwtm-oracle-12.2.0.1-6.11.2.tar.gz;
      • iwtm-adp-6.11.2.tar.gz.
      Информация
      titleПримечание:

      При наличии в Системе подсистемы Краулер потребуется приостановить службы указанной подсистемы (на сервере Краулер). Данная процедура выполняется на сервере, где установлена подсистема, стандартными средствами ОС Windows: Пуск - Панель управления - Администрирование - Службы, затем потребуется выделить службу в списке служб и нажать Приостановка службы.

    2. Введите команды для остановки перехватчиков:
      iwtm stop icap
      iwtm stop smtpd
      iwtm stop sniffer
      iwtm stop xapi_xapi
      iwtm stop xapi_puppy

    3. Снова введите команду для вызова файлового менеджера:
      mc
    4. Дождитесь, пока обработаются все события, стоящие в очереди на обработку. События, находящиеся в очереди, хранятся в следующих директориях:
      /opt/iw/tm5/queue/analysis/.db/
      /opt/iw/tm5/queue/analysis/.in/
      /opt/iw/tm5/queue/analysis/.out/
      /opt/iw/tm5/queue/db/.db/
      /opt/iw/tm5/queue/db/.in/
      /opt/iw/tm5/queue/db/.out/
      /opt/iw/tm5/queue/smtp/.db/
      /opt/iw/tm5/queue/smtp/.in/
      /opt/iw/tm5/queue/smtp/.out/
      /opt/iw/tm5/queue/x2x/.db/
      /opt/iw/tm5/queue/x2x/.in/
      /opt/iw/tm5/queue/x2x/.out/

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

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

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

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

      Чтобы удалить событие, перейдите в нужную директорию в файловом менеджере, установите курсор на планируемом к удалению событии и нажмите F8, затем подтвердите удаление, выбрав в открывшемся окне Yes.

    5. Для выхода из файлового менеджера (требуется для лучшего контроля выполнения команд) введите команду:
      exit
    6. Для остановки сервисов Traffic Monitor введите команду:
      iwtm stop
    7. В зависимости от используемой СУБД:
      • Если используется  СУБД Oracle:
        service oracle stop
      • Если используется  СУБД PostgreSQL:
        service postgresql-9.6 stop

    8. Введите команды для остановки служб:
      systemctl stop iwtm-php-fpm
      systemctl stop nginx
      systemctl stop nagios
      systemctl stop iwtm-consul
    9. Подключите внешние или локальные репозитории Red Hat Enterprise Linux 7.
      С инструкцией по настройке локального репозитория можно ознакомиться на официальном сайте Red Hat Enterprise Linux (страница доступна на английском языке).

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

      Будет выведен запрос вида:
      Image Added
      Для продолжения наберите Y на клавиатуре и нажмите Enter.

    11. Введите команду для перехода в директорию c дистрибутивами Traffic Monitor:
      cd /root
    12. Для запуска обновления пакетов Traffic Monitor введите команду:
      bash ./iwtm-installer-x.x.x.xxx-rhel7.run

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

      bash ./iwtm-installer-6.11.2.1032-rhel7.run
      Перед запуском установщик выполнит проверку Системы и, если будет обнаружено несоответствие требованиям, прервет обновление, выведя сообщение об ошибке.
      В этом случае необходимо исправить указанное установщиком несоответствие и повторно запустить обновление.
      В открывшемся окне, оповещающем о том, что найдена более ранняя версия InfoWatch Traffic Monitor, выберите Update и нажмите Enter:
      Image Added
      Дождитесь завершения обновления пакетов.

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

      Обновление схемы базы данных может занять длительное время.

      Пример: для базы данных объемом 1 ТB - от 30 минут.

      Для обновления необходимо обеспечить:

      • 11 GB свободного пространства в ORACLE_HOME, по умолчанию директория /u01/app/oracle - для СУБД Oracle;
      • 12 GB свободного пространства корневом каталоге системы - для СУБД PostgreSQL.

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

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

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

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

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

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

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

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

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

    15. Перейдите в директорию /opt/iw/tm5/etc/scripts/ и убедитесь в наличии файла iwssid.lua.upgrade.
      Файл iwssid.lua.upgradeне используется Системой, он служит источником информации для восстановления работоспособности Системы в случае ее глубокой кастомизации.
    16. Также в директории /opt/iw/tm5/etc/scripts/ должен быть файл iwssid.lua , его рекомендуется оставить без изменений, если до обновления он не редактировался.
      В противном случае его необходимо корректно объединить с конфигурационным файлом iwssid.lua.rpmnew (см. статью "Объединение конфигурационных файлов").
    17. Для выхода из файлового менеджера:
      exit
    18. Введите команду для перезагрузки сервера:
      reboot
      Дождитесь загрузки сервера и повторно авторизуйтесь, выполнив действия 1-3 инструкции перед обновлением.

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

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

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

      yum clean all

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

    21. Введите команду для проверки запуска процессов:
      iwtm status  
      На экране отобразится список процессов и их статус. Обычно сервисы iw_qmover_client,  iw_qmover_server и iw_image2text_fre_batch бывают остановлены, а все остальные сервисы - запущены, при этом строки должны заканчиваться фразой "inactive (dead)" для сервисов iw_qmover_client, iw_qmover_server и iw_image2text_fre_batch и фразой "active (running)" для всех остальных сервисов:
      Image Added

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

      При наличии в Системе подсистемы Краулер потребуется запустить службы указанной подсистемы (на сервере Краулер). Данная процедура выполняется на сервере, где установлена подсистема, стандартными средствами ОС Windows: Пуск - Панель управления - Администрирование - Службы, затем потребуется выделить службу в списке служб и нажать Запуск службы.

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

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

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

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

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

    If PostgreSQL DBMS is used in the System, it is necessary to take the following steps when updating Traffic Monitor version 6.0 or 6.1 to 6.5 and higher:

    Объединение конфигурационных файлов
    Sv translation
    languageen
    Предупреждение
    titleWarning!

    Before updating TM server to version 6.11 we recommend updating DM server first.

    The update will be done through a console of the server being updated. A console (or a terminal) is a window of a Linux-based operating system where you can type commands in a text form - as strings. Depending on the server type, when started, the console may display general information on the server and an invitation to log in or just an invitation to log in without general information. In any case, you have to enter the user login that will be used for working the console.

    The console looks as follows:

    Image Added

    To update 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 Launch Virtual Machine Console command (see an example below).
        Image Added A window with the server console will open.
    2. In the Login as: (or login: - depending on the server type) line, enter root and press Enter.
      Image Added
    3. In the root@<server_address>'s password: (or Password: - depending on the server type) line, enter a password of the root user (superuser) and press Enter.
      Please, note that nothing is displayed in the line while typing.
      Image Added
      The screen will display the service information and (in the last line) an invitation to enter the command (command line).

      Информация
      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, it is recommended using the Screen utility. Thus you can avoid problems in case of lost connection with updating server. 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 screen (to be input within the screen window);
      • screen -ls - display the list of screen running;
      • screen -r - connect to screen again;
      • screen -r name - connect to a specific screen with «name»;
      • exit - exit screen (to be input within the screen window).
    4. Enter the command to call the file manager:
      mc 
      Image Added

      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.

    5. Go to the /opt/iw/tm5 directory and make sure that it contains iwks_mode file.
      Image Added

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

      If iwks_mode file is missing in the directory, you need to create it. For this, enter the command:

      touch iwks_mode

    6. Position the cursor on the iwks_mode fine and press F3.
      Depending on the System edition (Enterprise or Standard) the content of iwks_mode file will be displayed on the screen:
      • "iwall" word (indicates that the installation type is TME All-in-one: TM+DB server)  Image Added
      • "iwtms" word (indicates that the installation type is TMS All-in-one: TM+DB server) Image Added

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

        If the file content is different:

        1. press F3 again.

        2. press F4.

        3. in the window that opens, delete all characters and depending on the System edition, enter iwall or iwtms

        4. press F2.

        5. in the window that opens, confirm the file saving by clicking Save.

        6. press F10.

        7. press F3 and make sure that the file content is correct.

        Press F3.

    7. To see the number of Traffic Monitor version go to /opt/iw/tm5/version. 
      Depending on Traffic Monitor version that will be updated together with the System, further steps can differ.
    8. 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.

    Depending on how you are going to update the System, choose the instruction:


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

    Якорь
    Inplace
    Inplace

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

    The OS Red Hat Enterprise Linux will be updated up to the 7.x version together with the System. To update the OS, please check the official instruction.
    We strongly recommend to back up the System, clone it and update on this particular testing computer.
    If Oracle DBMS is used in the System, before processing the update you should perform a database backup. When Oracle DBMS update is running, changes cannot be rollback.

     To update the System, take the following steps:

    1. Copy files into the /root directory:
      1. The files from InfoWatch Traffic Monitor distributive:
        • iwtm-installer-x.x.x.xxx-rhel7.run (where x.x.x.xxx  is a number of build);
        • iwtm-postgresql-9.6.13-x.xx.x.tar.gz;
        • iwtm-oracle-12.2.0.1-x.xx.x.tar.gz;
        • iwtm-adp-x.xx.x.tar.gz.
      2. ISO-image of distributive disc of OS Red Hat Enterprise Linux 7.x.

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

        To make sure the ISO-image version of OS Red Hat Enterprise Linux 7.x distributive kit is correct, please check on official website the version number the System to be updated.

      Our example:

      • iwtm-installer-6.11.0.839-rhel7.run ;
      • iwtm-postgresql-9.6.13-6.11.0.tar.gz ;
      • iwtm-oracle-12.2.0.1-6.11.0.tar.gz ;
      • iwtm-adp-6.11.0.tar.gz ;
      • rhel-server-7.6-x86_64-dvd.iso .
    2. To make the file iwtm-installer-x.x.x.xxx-rhel7.run executable, enter the command:
      chmod u+x /root/iwtm-installer-x.x.x.xxx-rhel7.run 
      Our example command:
      chmod u+x /root/iwtm-installer-6.11.0.839-rhel7.run

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

      If Crawler subsystem is a part of the System, it is required to stop the services of this subsystem (on Crawler server): InfoWatch.Crawler.Scanner, InfoWatch.Crawler.Server, Consul Agent. This is to be done on the server, where the subsystem is installed using Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Stop service.

    3. Enter commands to stop interceptors:
      service iwtm stopwait icap
      service iwtm stopwait smtpd
      service iwtm stopwait expressd
      service iwtm stopwait sniffer
      service iwtm stopwait xapi_xapi
      service iwtm stopwait xapi_puppy
    4. Enter the command to call the file manager:
      mc
    5. Wait until all events which are in the queue for processing are processed. Events in the queue are located in the following directories:
      /opt/iw/tm5/queue/analysis/.db/
      /opt/iw/tm5/queue/analysis/.in/
      /opt/iw/tm5/queue/analysis/.out/
      /opt/iw/tm5/queue/db/.db/
      /opt/iw/tm5/queue/db/.in/
      /opt/iw/tm5/queue/db/.out/
      /opt/iw/tm5/queue/smtp/.db/
      /opt/iw/tm5/queue/smtp/.in/
      /opt/iw/tm5/queue/smtp/.out/
      /opt/iw/tm5/queue/x2x/.db/
      /opt/iw/tm5/queue/x2x/.in/
      /opt/iw/tm5/queue/x2x/.out/

      When all the events are processed, these directories should be empty.

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

      To continue the update, make sure that all specified directories are empty. Otherwise, we cannot guarantee that the System will be updated correctly and will operate properly after the update.

      If for some reason, you cannot wait until the processing is complete, you can delete events from the queue; these events will be completely removed from the System.

      To delete the event, go to the required directory in the file manager, position the cursor on the event you want to delete and press F8. Then, confirm the deletion by clicking Yes in the confirmation window that opens.

    6. To exit the file manager (is required to better control command execution), enter the command:
      exit
    7. To stop services of Traffic Monitor server, enter the command:
      service iwtm stop && chkconfig iwtm off
    8. Depending on DBMS being used and Traffic Monitor version installed, enter the command to stop the DB:
      • For Oracle DBMS:
        • service oracle stop && chkconfig oracle off
      • For PostgreSQL DBMS:
        • service postgresql-9.4 stop && chkconfig postgresql-9.4 off (Traffic Monitor 6.9.x version)
        • service postgresql-9.6 stop && chkconfig postgresql-9.6 off (Traffic Monitor 6.10.x version)
    9. Depending on Traffic Monitor version installed, enter the command:

      • service php-fpm stop && chkconfig php-fpm off (Traffic Monitor 6.9.x version)
      • service iwtm-php-fpm stop && chkconfig iwtm-php-fpm off (Traffic Monitor 6.10.x version)
    10. Enter commands to stop services:
      service redis stop && chkconfig redis off
      service nginx stop && chkconfig nginx off
      service gearmand stop && chkconfig gearmand off
      service nagios stop && chkconfig nagios off
    11. If you have Traffic Monitor 6.10.x version installed, enter the command to stop the service:
      service iwtm-consul stop && chkconfig iwtm-consul off
    12. To update packages enter the command:
      yum upgrade --exclude=nagios

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

      To run the command at this step you should connect Red Hat Enterprise Linux 6 repositories having the latest updates installed.

      Find how to work with repository in the guide on Red Hat Enterprise Linux official website.

      The following request will be displayed:

      Image Added

      To continue type Y and press Enter.

    13. After packages updating is completed, enter the command to reboot the server:
      reboot
      Wait until the server is loaded and log in again. For this, take the steps 1-3 of the instruction before updating.

    14. To install assistive utilities for updating, enter the command:

      yum -y install yum-utils redhat-upgrade-tool preupgrade-assistant preupgrade-assistant-ui preupgrade-assistant-el6toel7

      Wait until the installation is completed.     
    15. To disconnect repositories run the command:
      yum-config-manager --disable \* 

    16. Enter the command to clear the cash of package manager:
      yum clean all

    17. Delete or disconnect Red Hat Enterprise Linux 6 repositories:

      • To delete repositories:
        1. Enter the command to call file manager:
          mc
        2. Go to directory /etc/yum.repos.d/;
        3. Open configuration files of the Red Hat Enterprise Linux 6 repositories;
          The baseurl parameters contain the addresses of directories of local repositories;
        4. Delete these directories and their content, then delete the configuration files in the directory /etc/yum.repos.d/;
        5. To exit the file manager enter the command:
          exit
      • To disconnect the repository, take one of the following steps:
        • Open for editing the repository configuration file stored in /etc/yum.repos.d/, in enabled parameter change 1 for 0 and save changes;
        • Delete repository configuration file from the directory /etc/yum.repos.d/ .                                     
    18. To run the utility, checking the System before the update, enter the command:

      preupg –v

      The following request will be displayed:  Image Added

    19. To continue, type Y and press Enter. 

    20. Wait until the utility completes the job. The results of checking appear in the report /root/preupgrade/result.html , created by the utility. Follow the recommendations from the report. For this, check the paragraph 1.1.3.3 of official instruction.
    21. Delete the dkms package by running the command:

      rpm -ev --nodeps dkms

      Предупреждение
      titleWarning!
      Non‐compliance may cause the OS updating error.
    22. To run the updating utility, enter the command:
      redhat-upgrade-tool --iso /root/rhel-server-7.x-x86_64-dvd.iso (where 7.x is an edition of the OS Red Hat Enterprise Linux, up to which the System will be updated)

      Our example command:

      redhat-upgrade-tool --iso /root/rhel-server-7.6-x86_64-dvd.iso

      The following request will be displayed: Image Added
      To continue, type Y and press Enter.
      The following message will be displayed:
      Image Added

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

      In case OS Red Hat Enterprise Linux is updated to version following after 7.6, the message as follows can be displayed:

      Image Added

      The message is aimed to inform you about inability of operating system to be updated to the specified version. In this case, use ISO image of OS Red Hat Enterprise Linux distributive kit of the version which was specified in the message final part.

    23. Enter the command to restart server:
      reboot
      The updating continues after server is rebooted.   
    24. Wait until the updated System is loaded and log in again. For this, take the steps 1-3 of the instruction before updating.
    25. To update the configuration of Postfix mail server, enter the command:
      postfix upgrade-configuration
    26. 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 official site:

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

      Do not change web.conf, database.conf, consul.json files. It is also recommended not to change the file /etc/nagios/nagios.cfg.

    27. Before continuing the update, connect the external and internal repositories Red Hat Enterprise Linux 7.  
      You can check the instruction of the local repository setting on Red Hat Enterprise Linux official website.

    28. Enter the command to go to the directory containing Traffic Monitor distributives:
      cd /root

    29. If you are using Oracle DBMS, take the following steps:

      1. Enter the command to stop DBMS Oracle:
        service oracle start
      2. Enter the command to run the Oracle update:
        bash ./iwtm-installer-x.x.x.xxx-rhel7.run -- --oracle-upgrade

        Our example command:

        bash ./iwtm-installer-6.11.0.839-rhel7.run -- --oracle-upgrade
        After Oracle successful update the following message appears:
        Image Added

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

        Oracle DBMS upgrade may take a long time.
        Approximate timing to update 1 TB Oracle database:

        • DBMS Oracle will be updated in 60 minutes;
        • Oracle database scheme will be updated in 50 minutes.

        To perform the update, make sure there is 11 GB of free space in ORACLE_HOME, the default directory of which is /u01/app/oracle.

        The message saying that Oracle has been successfully upgraded also says that you can remove the previous Oracle version.

        You can remove it only after the System has been upgraded and all checks are completed.

        Before the removal, be sure to check that:

        • a new version is not installed in the /u01/app/oracle/product/db_1 directory;
        • all services of the System are started and running;
        • the System condition tab of the TM Console does not contain errors;
        • the DB contains old events. To check this, create a query on the Events tab and specify the required interception date;
        • the DB receives new events.

        To remove the old version, follow commands from the message.

      3. To convert password file to Oracle 12 format, please enter the command:
        su - oracle -c "orapwd file=${ORACLE_HOME}/dbs/orapwiwtm force=y format=12 input_file=${ORACLE_HOME}/dbs/orapwiwtm"

    30. Enter the command to update Traffic Monitor packages:
      bash ./iwtm-installer-x.x.x.xxx-rhel7.run

      Our example command:

      bash ./iwtm-installer-6.11.0.839-rhel7.run
      The installer will check the System before running and in case of non-compliance with requirements, it will interrupt the installation and display an error message. In this case, you need to correct the error and restart the update.
      In the window that opens informing that an early version of the InfoWatch Traffic Monitor has been found, choose Update and press Enter:

      Image Added

    31. If you are using PostgreSQL DBMS, and Traffic Monitor has been updated from the version 6.9.x, do the following:

      1. Update PostgreSQL DBMS.

      2. Enter the command to switch to postgres user:
        su - postgres
      3. Enter the command to run the script (scenario) of the DB update:
        bash /opt/iw/tm5/csw/postgres/update.sh

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

        Database scheme update may take a long time.

        Example: a database of size 1 TB will be updated in 95 minutes.

        To perform the update, make sure there is 12 GB of free space in the root directory.

      4. Enter the command:
        exit

    32. Enter the command to search and display the list of files with.rpmnew extension:

      find / -name "*rpmnew*" -print

      If mentioned files have been found, they should be correctly merged with configuration files ( see "Объединение конфигурационных файлов").

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

      Do not change web.conf, database.conf, consul.json files. It is also recommended not to change the file /etc/nagios/nagios.cfg.

    33. Enter the command to call file manager again:
      mc

    34. Go to the directory /opt/iw/tm5/etc/scripts/ and make sure that there is a file iwssid.lua.upgrade. The System does not use the file iwssid.lua.update, as it is a backup in case the System is to be customised.   

    35. The file iwssid.lua should be opt/iw/tm5/etc/scripts/ as well. We recommend to keep it as it is if it has not been edited before update.
      Otherwise, it should be correctly merged with the configuration file iwssid.lua.rpmnew ( see "Merging configuration files").

    36. To exit the file manager:
      exit 
    37. Enter the command to reboot server:
      reboot
      Wait until the server is loaded and log in again. For this, take the steps 1-3 of the instruction before the updating.

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

      After the start, Traffic Monitor connects to the database and loads the configuration file cas_config.xml from there. Depending on configuration size, file loading may take some time.
      During this loading period, the System may record error messages in log files:

      • Раскрыть
        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

      After the configuration file has been successfully loaded, the System will stop recording error messages and will work in standard mode.

      If the System continues to record error messages for a long time, check connection with the database.

    38. Enter the command to delete Red Hat Enterprise Linux 6 packages:

      yum remove *.el6*

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

      Before the deletion processing on display, you will see the list of packages to be removed and a query for removal. Please carefully check the list for packages starting with "iwtm-". Once you see any package, cancel the deletion and miss this action.

      To delete the displayed list of packages, press Y on the keyboard and press Enter.

    39. Enter the command to clear cash of packages manager.
      yum clean all

    40.  Enter the command to clear cash:

      redis-cli flushall                             

    41. Enter the command to check start of processes:
      iwtm status
      The processes and their statuses will be displayed. Usually, the services iw_qmover_client, iw_qmover_server and iw_image2text_fre_batch are stopped, the rest of services are running. Thereby the strings should have the following endings: "inactive (dead)" for the services iw_qmover_client,iw_qmover_server and iw_image2text_fre_batch and "active (running)" for other services:

    Image Added

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

    If Crawler subsystem is a part of System, it is required to run the services of this subsystem (on Crawler server): InfoWatch.Crawler.Scanner, InfoWatch.Crawler.Server, Consul Agent. This is to be done on the server, where the subsystem is installed with Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Start service.

    Traffic Monitor All-in-one server is updated. The System version shown in the management Console window About the System should be changed accordingly. If you have other systems or subsystems to be updated, check the instructions of the chapter.

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

    If automatic synchronizations with LDAP servers are configured in the System, then after update, perform synchronizations manually to guarantee load of entities (see "Infowatch Traffic Monitor. User Guide", "Running Synchronization with Server Manually").

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

    Clear the cash before starting, so the Console can be displayed correctly. Use your browser standard functionalities to perform the action.

    Раскрыть
    titleUpdating system by reinstalling and restoring data from backup copy

    Якорь
    Backup
    Backup

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

    We strongly recommend to back up the System, clone it and update on this particular testing machine.
    If Oracle DBMS is used in the System, before processing the update you should perform a database backup. When Oracle DBMS update is running, changes cannot be rollback.

    The OS Red Hat Enterprise Linux 7.x will be installed during the System updating.

    After installing OS Red Hat Enterprise Linux 7.x version, Traffic monitor configuration files should be set up again. We recommend saving them to perform additional configuration after the update.

    During the System update, the following steps will be performed:

        1. DB, indexes and configuration of iw_adlibitum service backup (Preparing for update).
        2. Installation of the OS Red Hat Enterprise Linux 7.x (The user follows the official instruction to install the OS).
        3. InfoWatch Traffic Monitor 6.11 installation.
        4. Data backup and DBMS update.

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

    If Crawler subsystem is a part of System, it is required to run the services of this subsystem (on Crawler server): InfoWatch.Crawler.Scanner, InfoWatch.Crawler.Server, Consul Agent. This is to be done on the server, where the subsystem is installed with Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Stop service.

    1. Enter commands to stop interceptors and iw_indexer:
      service iwtm stopwait icap
      service iwtm stopwait smtpd
      service iwtm stopwait expressd
      service iwtm stopwait sniffer
      service iwtm stopwait xapi_xapi
      service iwtm stopwait xapi_puppy
      service iwtm stopwait indexer 

    2. Again, enter the command to call the file manager:
      mc
    3. Wait until all events which are in the queue for processing are processed. Events in the queue are located in the following directories:
      /opt/iw/tm5/queue/analysis/.db/
      /opt/iw/tm5/queue/analysis/.in/
      /opt/iw/tm5/queue/analysis/.out/
      /opt/iw/tm5/queue/db/.db/
      /opt/iw/tm5/queue/db/.in/
      /opt/iw/tm5/queue/db/.out/
      /opt/iw/tm5/queue/smtp/.db/
      /opt/iw/tm5/queue/smtp/.in/
      /opt/iw/tm5/queue/smtp/.out/
      /opt/iw/tm5/queue/x2x/.db/
      /opt/iw/tm5/queue/x2x/.in/
      /opt/iw/tm5/queue/x2x/.out/
      When all the events are processed, these directories should be empty.

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

      To continue the update, make sure that all specified directories are empty. Otherwise, we cannot guarantee that the System will be updated correctly and will operate properly after the update.

      If for some reason, you cannot wait until the processing is complete, you can delete events from the queue; these events will be completely removed from the System.

      To delete the event, go to the required directory in the file manager, position the cursor on the event you want to delete and press F8. Then, confirm the deletion by clicking Yes in the confirmation window that opens.

    4. To exit the file manager (is required to better control command execution), enter the command:
      exit
    5. To stop services of Traffic Monitor server, enter the command:
      service iwtm stop && chkconfig iwtm off
    6. Depending on Traffic Monitor version, enter the command:
      • service php-fpm stop && chkconfig php-fpm off (Traffic Monitor 6.9.x version)
      • service iwtm-php-fpm stop && chkconfig iwtm-php-fpm off (Traffic Monitor 6.10.x version)
    7. Connect to DB and check the number of events it contains:

      1. Раскрыть
        titleFor Oracle DBMS
        1. To connect to DB server, enter the commands using a console:
          su - oracle
          sqlplus <scheme_owner_data> where <scheme_owner_data> - login and password of DB scheme owner. Default data are available on the Accounts page.
          Example:
          su - oracle
          sqlplus iwtm/xxXX1234

        2. Then enter the command: 
          select count(1) from object;
        3. To disconnect from DB, enter the command:
          exit

        4. To switch to other user, enter the command:
          exit

      2. Раскрыть
        titleFor PostgreSQL DBMS
        1. To connect to DB server, enter the commands using a console:
          su - iwtm
          psql postgres iwtm -p 5433

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

        4. Enter the command:
          exit

    8. To stop searchd processes enter the command:

      killall searchd
      To verify, enter the command: 
      ps -ef | grep searchd | grep -v grep
      The command should not respond with running processes.

    9. Run 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 (ex., Ext4 or XFS).

      Store backup copies either on a separate section of server or on another server, or on external device.

      Make sure that the data will not be lost when installing the OS Red Hat Enterprise Linux 7.x.

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

      1. Depending on DBMS being used and the Traffic Monitor version installed, enter the command to stop the DB:

        • For Oracle DBMS:

          • service oracle stop && chkconfig oracle off

        • For PostgreSQL DBMS:

          • service postgresql-9.4 stop && chkconfig postgresql-9.4 off (Traffic Monitor 6.9.x version)

          • service postgresql-9.6 stop && chkconfig postgresql-9.6 off (Traffic Monitor 6.10.x version)

      2. Make DB backup. By default, DB is stored in the directories /u01, /u02 etc. Copy DB into another section of sever or on another server, or on an external device.

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

        To specify directories keeping DB, check the file:

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

        • /opt/iw/tm5/csw/postgres/database.conf (DBMS PostgreSQL)
      3. Make indexes backup. To do this:
        1. Enter the command to call the file manager:
          sudo mc
        2. Go to /opt/iw/tm5/etc directory and open file indexer.conf in view mode.
        3. The path to indexes directory is defined in "SphinxBaseDir" parameter. A relative path to indexes archive is defined in "ArchiveDir" parameter. Archive path is defined relatively to content of "NookDir" parameter.
          Copy indexes directories and indexes archive into either other section of server, or other server, or external device.
      4. Make iw_adlibitum service configuration backup. To do this, take the following steps:
        1. Go to /opt/iw/tm5/etc directory and open file adlibitum.conf in view mode.

        2. A relative path to the directory containing iw_adlibitum service configuration is defined in "ConfigDir" parameter. The path is defined relatively to the content of "NookDir" parameter.

          Copy configuration directory into either other section of the server, or another server, or external device.

        3. To exit the file manager (is required to better control command execution), enter the command:
          exit

    10. Install the OS Red Hat Enterprise Linux 7.x on server. To do this, check official instruction.

    11. Install Traffic Monitor version 6.11.

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

      If backup copies are kept on external storages, do not connect them during the installation.

      It should be done right before DB backup and update.

    12. To stop service enter the commands:
      iwtm stop
      service iwtm-php-fpm stop 
      service nagios stop
    13. Depending on DBMS you are using, enter the command to stop the DB:
      • service oracle stop (Oracle DBMS)

      • service postgresql-9.6 stop (PostgreSQL DBMS)

    14. To stop  searchd processes, enter the command:
      killall searchd
      To verify, enter the command: 
      ps -ef | grep searchd | grep -v grep
      Command response should not have running processes.
    15. Copy DB backup copy that was created at step 9b into the original directory.
    16. When using Oracle DBMS, please make sure the uid ID (oracle user) and gid ID (oinstall group) have the value equal to 1001:
      a. To find out the uid and gid ID values, please run the command:
      id oracle
      b. Check the rights as per /u01 and /u02 directories:
      ls -l /u01
      ls -l /u02

      c. In case the rights are incorrect, search all these rights as per this owner in files and directories and replace it as follows:
      find /u01 -uid 501 -exec chown -v -h 1001 '{}' \;
      find /u01 -gid 501 -exec chgrp -v 1001 '{}' \;
      find /u02 -uid 501 -exec chown -v -h 1001 '{}' \;
      find /u02 -gid 501 -exec chgrp -v 1001 '{}' \;
    17. Enter command to shift to Traffic Monitor distributive's directory:
      cd /root
    18. Update DBMS:
      1. Раскрыть
        titleFor Oracle DBMS
        1. Enter command to start Oracle:
          service oracle start
        2. Enter command to start Oracle update:
          bash ./iwtm-installer-x.x.x.xxx-rhel7.run -- --oracle-upgrade

          Our example command:

          bash ./iwtm-installer-6.11.0.630-rhel7.run -- --oracle-upgrade
          In case of successful update the following message will be displayed:

          Image Added

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

          Oracle DBMS upgrade may take a long time.
          Approximate timing to update 1 TB Oracle database:

          • DBMS Oracle will be updated in 60 minutes;
          • The Oracle database scheme will be updated in 50 minutes.

          To perform the update, make sure there is 11 GB of free space in ORACLE_HOME, the default directory of which is /u01/app/oracle.

          The message saying that Oracle has been successfully upgraded also says that you can remove the previous Oracle version.

          You can remove it only after the System has been upgraded and all checks are completed.

          Before the removal, be sure to check that:

          • a new version is not installed in the /u01/app/oracle/product/db_1 directory;
          • all services of the System are started and running;
          • the System condition tab of the TM Console does not contain errors;
          • the DB contains old events. To check this, create a query on the Events tab and specify the required interception date;
          • the DB receives new events.

          To remove the old version, follow commands from the message.

        3. Enter the command to shift to directory, containing the script (scenario) of DB scheme update.
          cd /opt/iw/tm5/csw/oracle

        4. Enter the command to run the script:
          su --command "/opt/iw/tm5/csw/oracle/update.sh" oracle

        5. To convert password file to Oracle 12 format, please enter the command:
          su - oracle -c "orapwd file=${ORACLE_HOME}/dbs/orapwiwtm force=y format=12 input_file=${ORACLE_HOME}/dbs/orapwiwtm"

      2. Раскрыть
        titleFor PostgreSQL DBMS
        1. If System updates from version 6.9.x:
          1. Run PostgreSQL DBMS update.
          2. Enter command to run script (scenario) of the DB scheme update:
            su --command "/opt/iw/tm5/csw/postgres/update.sh" postgres
        2. If System updates from version 6.10.x:
          1. Enter command to run PostgreSQL:
            service postgresql-9.6 start
          2. Run command:
            su --command "/usr/pgsql-9.6/bin/psql -d postgres -p 5433 -f /opt/iw/tm5/etc/update_psql_commands" postgres
          3. Enter command to shift to directory containing the script (scenario) of DB scheme update:
            cd /opt/iw/tm5/csw/postgres
          4. Enter the command to run the script:
            su --command "/opt/iw/tm5/csw/postgres/update.sh" postgres

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

            The database scheme update may take a long time.

            Example: a database of size 1 TB will be updated in 95 minutes.

            To perform the update, make sure there is 12 GB of free space in the root directory.

    19. Perform step 7 of the instruction to compare the number of events in DB before and after update.
    20. Copy backup copies that were created at step 9b and 9c, into original directories and files.

      If original directory is not a default one, it needs to be indicated in the appropriate sections of configuration files (see steps 10b and 10c). 

    21. Run the commands:

      sudo -u iwtm touch /opt/iw/tm5/www/backend/protected/runtime/first_run
      iwtm restart kicker
    22. Enter command to reboot server:

      reboot
      Wait until server loading is completed and log in again by performing steps 1-3 of the instruction before updating.

    23. Enter command to clear cash:
      redis-cli flushall
    24. Enter the command to test processes' start:
      iwtm status 
      List of processes and their statuses will be displayed. Usually, the services iw_qmover_client,  iw_qmover_server and iw_image2text_fre_batch are stopped, the rest of services are running. Thereby the strings should have the following endings: "inactive (dead)" for the services iw_qmover_client,iw_qmover_server and iw_image2text_fre_batch and "active (running)" for other services:

    Image Added

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

    If the Crawler subsystem is a part of the System, it is required to run the services of this subsystem (on Crawler server). This is to be done on the server, where the subsystem is installed with Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Start service.

    Updating Traffic Monitor All-in-one server is complete. The System version 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 instructions in this section.

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

    If automatic synchronizations with LDAP servers are configured in the System, then after update, perform synchronizations manually to guarantee load of entities (see "Infowatch Traffic Monitor. User Guide", "Running Synchronization with Server Manually").

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

    For the Management Console to be displayed correctly, delete the cache in your browser before you start working in the Management Console. This is done with browser standard tools.

    Раскрыть
    titleUpdating the System from version 6.11.xx to 6.11.yy

    Якорь
    In_Version
    In_Version

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

    We strongly recommend to back up the System, clone it and update on this particular testing computer.

     To update the System, take the following steps:

    1. Copy the files from InfoWatch Traffic Monitor distributive into the /root directory:
      • iwtm-installer-x.x.x.xxx-rhel7.run (where x.x.x.xxx  is a number of build);
      • iwtm-postgresql-9.6.13-x.xx.x.tar.gz;
      • iwtm-oracle-12.2.0.1-x.xx.x.tar.gz;
      • iwtm-adp-x.xx.x.tar.gz.

      Our example:

      • iwtm-installer-6.11.2.1032-rhel7.run;
      • iwtm-postgresql-9.6.13-6.11.2.tar.gz;
      • iwtm-oracle-12.2.0.1-6.11.2.tar.gz;
      • iwtm-adp-6.11.2.tar.gz.
      Информация
      titleNote:

      If Crawler subsystem is a part of the System, it is required to stop the services of this subsystem (on Crawler server): InfoWatch.Crawler.Scanner, InfoWatch.Crawler.Server, Consul Agent. This is to be done on the server, where the subsystem is installed using Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Stop service.

    2. Enter commands to stop interceptors:
      iwtm stop icap
      iwtm stop smtpd
      iwtm stop sniffer
      iwtm stop xapi_xapi
      iwtm stop xapi_puppy
    3. Enter command to call the file manager:
      mc
    4. Wait until all events which are in the queue for processing are processed. Events in the queue are located in the following directories:
      /opt/iw/tm5/queue/analysis/.db/
      /opt/iw/tm5/queue/analysis/.in/
      /opt/iw/tm5/queue/analysis/.out/
      /opt/iw/tm5/queue/db/.db/
      /opt/iw/tm5/queue/db/.in/
      /opt/iw/tm5/queue/db/.out/
      /opt/iw/tm5/queue/smtp/.db/
      /opt/iw/tm5/queue/smtp/.in/
      /opt/iw/tm5/queue/smtp/.out/
      /opt/iw/tm5/queue/x2x/.db/
      /opt/iw/tm5/queue/x2x/.in/
      /opt/iw/tm5/queue/x2x/.out/

      When all the events are processed, these directories should be empty.

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

      To continue the update, make sure that all specified directories are empty. Otherwise, we cannot guarantee that the System will be updated correctly and will operate properly after the update.

      If for some reason, you cannot wait until the processing is complete, you can delete events from the queue; these events will be completely removed from the System.

      To delete the event, go to the required directory in the file manager, position the cursor on the event you want to delete and press F8. Then, confirm the deletion by clicking Yes in the confirmation window that opens.

    5. To exit the file manager (is required to better control command execution), enter the command:
      exit
    6. To stop services of Traffic Monitor server, enter the command:
      iwtm stop
    7. Depending on DBMS being used enter the command to stop the DB:
      • For Oracle DBMS:
        service oracle stop
      • For PostgreSQL DBMS:
        service postgresql-9.6 stop
    8. Enter commands to stop services:
      systemctl stop iwtm-php-fpm
      systemctl stop nginx
      systemctl stop nagios
      systemctl stop iwtm-consul
    9. Connect the external and internal repositories Red Hat Enterprise Linux 7.  
      You can check the instruction of local repository setting on Red Hat Enterprise Linux official website.
    10. To update packages enter the command:
      yum upgrade

      The following request will be displayed:

      Image Added

      To continue type Y and press Enter.

    11. Enter the command to go to the directory containing Traffic Monitor distributives:
      cd /root

    12. Enter the command to update Traffic Monitor packages:
      bash ./iwtm-installer-x.x.x.xxx-rhel7.run

      Our example command:

      bash ./iwtm-installer-6.11.0.839-rhel7.run
      The installer will check the System before running and in case of non-compliance with requirements, it will interrupt the installation and display an error message. In this case you need to correct the error and restart the update.
      In the window that opens informing that an early version of the InfoWatch Traffic Monitor has been found, choose Update and press Enter:

      Image Added

      Please wait until the packages update is complete.

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

      The database scheme update may take a long time.

      Example: for database of size 1 TB - above 30 minutes.

      To perform the update, make sure:

      • There is 11 GB of free space in ORACLE_HOME, the default directory of which is /u01/app/oracle - for Oracle DBMS;
      • There is 12 GB of free space in the root directory - for PostgreSQL DBMS.

      The message saying that Oracle has been successfully upgraded also says that you can remove the previous Oracle version.

      You can remove it only after the System has been upgraded and all checks are completed.

      Before the removal, be sure to check that:

      • a new version is not installed in the /u01/app/oracle/product/db_1 directory;
      • all services of the System are started and running;
      • the System condition tab of the TM Console does not contain errors;
      • the DB contains old events. To check this, create a query on the Events tab and specify the required interception date;
      • the DB receives new events.

      To remove the old version, follow commands from the message.

    13. Enter the command to find and display the list of files with .rpmnew extension at the console:
      find / -name "*rpmnew*" -print
      If the files

    mentioned
    1. have been found, they should be correctly merged with configuration files (

    see 
    1. see "Merging configuration files").

    warning
    1. Информация
      title
    Important!
    Multiexcerpt include
    MultiExcerptNameENG
    PageWithExcerpt
    1. Note:

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

    2. Enter the command to call the file manager again:
      mc

    3. Go

    to 
    1. to directory /opt/iw/tm5/etc/scripts/

    directory
    1. and make sure

    the file 
    1. that there is a file iwssid.lua.upgrade

    is in place.File is recommended to remain with no changes implemented in case any term from the following is complied:
  • System's update is held as per version 6.9;
  • iwssid.lua file
    1. . The System does not use the file iwssid.lua.update, as it is a backup in case the System is to be customised.

    2. The file iwssid.lua should be opt/iw/tm5/etc/scripts/ as well. We recommend to keep it as it is, if it has not been edited before

    the
    1. update.
      Otherwise,

    this
    1. it should be correctly merged

    with iwssid
    1. with configuration file iwssid.lua

    file
    1. .rpmnew (

    see 
    1. see "Merging configuration files

    ").Depending on DBMS used go to the directory:
    1. ").

    2. To exit the file manager:
      exit 
    3. Enter the command to reboot the server:
      reboot
      Wait until server is loaded and log in again. For this, take the steps 1-3 of the instruction before the updating.

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

      After the start, Traffic Monitor connects to the database and loads the configuration file cas_config.xml from there. Depending on configuration size, file loading may take some time.
      During this loading period, the System may record error messages in log files:

      • Раскрыть
        title/opt/iw/tm5/
    csw/oracle (if Oracle DBMS is used);
  • /opt/iw/tm5/csw/postgres (if PostgreSQL DBMS is used).
  • Select the database.conf file.
    Image Removed
  • Press F3.
  • Make sure that for the \set schema_version parameter, a version to which you are updating the System is specified. If an old version is specified, repeat steps 27 - 36.
  • Press F3.
  • To exit the file manager (is required to better control command execution), enter the command:
    exit
  • To stop services, enter the commands one by one:
    service iwtm stop
    service iwtm-php-fpm stop
    service nagios stop

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

    If Crawler subsystem is a part of System, it is required to stop the services of this subsystem (on Crawler server). This is to be done on the server, where the subsystem is installed with Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Stop service.

  • If PostgreSQL DBMS is used in the System, perform Updating PostgreSQL DBMS.
  • Depending on DBMS used, enter the command to switch to the required user:
    • su - oracle - to switch to the oracle user (if Oracle DBMS is used in the System)
    • su - postgres - to switch to the postgres user (if PostgreSQL DBMS is used in the System)
  • Depending on DBMS used, enter the command to go to the required directory:
    • cd /opt/iw/tm5/csw/oracle - (if Oracle DBMS is used in the System)
    • cd /opt/iw/tm5/csw/postgres - (if PostgreSQL DBMS is used in the System)
  • Enter the command to start the database update script:
    ./update.sh 

    The process of updating the database scheme will start. It may take some time. When the update is complete, the screen will display an information message and a command prompt:

    Image Removed
  • Enter the command to clear the cache:
    redis-cli flushall
  • To switch back to the root user, enter the command:
    exit
  • Enter the command to call the file manager:
    mc
  • Go to /etc/yum.repos.d, place cursor on the file rhel-dvd.repo and press F4.
  • In the [rhel-dvd],[rhel-dvd-iwtm] and [rhel-dvd-iwtm-cfdb] blocks, change values of the enabled parameter from 1 to 0.
  • Press F2.
  • Click Save in the opened window to confirm saving the file.
  • Press F10.
  • Press F3 and make sure the file is correct, then press  F3 again to close the file.
  • To exit the file manager (required for beеter commands execution)б enter the command:
    exit
  • Enter the command to restart the server:
    reboot
  • Wait until the server is started and repeat steps 2 and 3 of this instruction to log in the console.
  • Enter the command to check if the processes are started:
    service iwtm status 
    The screen will display the list of processes and their status. Generally, the services iw_qmover_client, iw_qmover_server and iw_image2test_fre_batch are stopped and all other services are started. For iw_qmover_client, iw_qmover_server and iw_image2test_fre_batch services, the lines should end with "is stopped (disabled)..." and for all other services, the lines should end with "is running...":
    Image Removed
      • 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

      After the configuration file has been successfully loaded, the System will stop recording error messages and will work in standard mode.

      If the System continues to record error messages for a long time, check connection with the database.

    1. Enter the command to clear cash of packages manager.
      yum clean all

    2.  Enter the command to clear cash:

      redis-cli flushall                             

    3. Enter the command to check start of processes:
      iwtm status
      The processes and their statuses will be displayed. Usually, the services iw_qmover_client, iw_qmover_server and iw_image2text_fre_batch are stopped, the rest of services are running. Thereby the strings should have the following endings: "inactive (dead)" for the services iw_qmover_client,iw_qmover_server and iw_image2text_fre_batch and "active (running)" for other services:

    Image Added

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

    If

    the

    Crawler subsystem is a part of System, it is required to

    start

    run the

    services

    services of this subsystem (on Crawler server): InfoWatch.Crawler.Scanner, InfoWatch.Crawler.Server, Consul Agent. This is to be done on the server, where the subsystem is installed with Windows standard tools:

     

    Start

     

    -

     

    Control Panel

     

    -

     

    Administrative Tools

     

    -

     

    Services, then select the service in the list and click

     

    Start service.

    Updating

    Traffic Monitor All-in-one server is

    complete

    updated.

    Version of the

    The System version shown in the management Console window About

    window of the Management Console will

    the System should be changed accordingly. If

    the System includes other servers

    you have other systems or subsystems to be updated,

    follow instructions in this section

    check the instructions of the chapter.

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

    If automatic synchronizations with LDAP servers are configured in the System, then after update, perform synchronizations manually to guarantee load of entities (see "Infowatch Traffic Monitor. User Guide", "Running Synchronization with Server Manually").

    Информация
    titleNote:
    For the Management Console to

    Clear the cash before starting, so the Console can be displayed correctly

    , delete the cache in your browser before you start working in the Management Console. This is done with browser standard tools

    . Use your browser standard functionalities to perform the action.