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

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

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 7.16
php space_manager tbs:normalize-platform --configpath=/opt/iw/tm5/etc
Sv translation
languageru

Начиная с версии 7.14, Traffic Monitor может отправлять события в Платформу двумя способами:

  • согласно настройкам синхронизации в Центре расследований;
  • в реальном времени.

Отправка событий в реальном времени позволяет уменьшить нагрузку на Traffic Monitor.

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

Убедитесь, что в Traffic Monitor и Центре расследований выбран один и тот же способ отправки событий.

Платформа может получать события в реальном времени начиная с версии 2.5.

Якорь
change_method
change_method
Переключение способа отправки событий

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

Блок кода
languagetext
platform_conf_ctl --fl-set-enabled <bool> --fl-set-uri <uri> --fl-set-token <token> --fl-set-integration-id <id> --ds-set-enabled <bool> --ds-set-uri <uri> --ds-set-token <token>
где укажите следующие параметры

Укажите в ней следующие параметры соединения с платформенным сервисом FactsLoader:

ПараметрОписание

--fl-set-enabled

--ds-set-enabled

Включение/отключение отправки событий в реальном времени:

  • true (по умолчанию) – включение отправки событий в реальном времени;
  • false – отключение отправки событий в реальном времени; отправка согласно настройкам синхронизации в Центре расследований.

--fl-set-uri

--ds-set-uri

URI-идентификатор хоста Платформы в формате http://<host>:<port>, где <host> – имя хоста или IP-адрес сервера Платформы, <port>

 –

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


Примечание: если Traffic Monitor использует отдельный Data Storage для хранения собственных данных, не указывайте его. Укажите именно Data Storage Платформы, в которую планируете отправлять события

. По умолчанию используется порт 10104.

Важно!
В этом параметре должен быть указан адрес той же ноды Платформы, что выбрана в поле "Филиал" интеграции с Traffic Monitor в Центре Расследований.
Подробнее см. Руководство администратора используемого платформенного продукта, статья Интеграция с InfoWatch Traffic Monitor.

--fl

-set

-

token--ds-

set-token

Значение токена для соединения с Платформой.

О получении токена

Вы можете получить его в Центре Расследований, Image AddedНастройки → Настройки системы → Основные настройки, в поле Токен для Data Storage User.
Подробнее см. Руководство администратора используемого платформенного продукта, статья Основные настройки. 

Вы можете задать

токен

значение токена по умолчанию,

указав

если не обновляли его. Для этого укажите --fl-set-token default

--ds-set-token default 

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

--fl-set-integration-id

Уникальный идентификатор интеграции Платформы с Traffic Monitor.

О получении ID

Вы можете скопировать ID интеграции в разделе Image AddedНастройки → Настройки системы → Интеграции. На плитке интеграции нажмите Image Added и выберите Скопировать ID.
Подробнее см. Руководство администратора используемого платформенного продукта, статья Интеграция с InfoWatch Traffic Monitor.

Если Traffic Monitor использует Data Storage для хранения собственных данных, то в параметре --fl-set-uri указывайте адрес сервера Data Storage или любого другого сервера Платформы, находящегося в одном кластере с Data Storage. Бинарные данные продолжат храниться в том же Data Storage, что и раньше. Текстовые данные – в базе данных Traffic Monitor. При этом сервис FactsLoader будет загружать текстовые контенты на свой сервер и хранить там для отображения событий в Центре Расследований.
О настройке соединения с хранилищем см. Настройка соединения с Data Storage.

Если Traffic Monitor не использует Data Storage для хранения собственных данных, то после настройки соединения с сервисом FactsLoader все данные будут храниться в БД Traffic Monitor, как и раньше. Но при этом их копии также будут храниться на сервере Платформы, указанном в параметре --fl-set-uri.

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

В случае распределенной установки утилиту нужно запускать на сервере, установленном при помощи шаблона Перехватчики.

Пример команды включения отправки в реальном времени:

Блок кода
languagetext
platform_conf_ctl --fl-set-enabled true --fl-set-uri http://10.60.23.249:10104  --fl-set-token default --fl-set-integration-id e06bd150-513b-4eb6-975a-533cf96e50ab --ds-set-enabled true --ds-set-uri http://10.60.23.249:40731  --ds-set-token default

Команда отключения отправки в реальном времени и перехода на отправку по расписанию:

Блок кода
languagetext
platform_conf_ctl --fl-set-enabled false --ds-set-enabled false

Настройка отправки событий в реальном времени

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

  1. В Центре расследований скопируйте ID интеграции.
  2. На сервере Traffic Monitor используйте утилиту, чтобы переключить способ отправки событий.
  3. Перезапустите службу iw_x2db:

    Блок кода
    languagetext
    systemctl restart iw_x2db
  4. Перейдите в Центр расследований. Чтобы отображались события с момента последней синхронизации до переключения на режим отправки в реальном времени, запустите синхронизацию вручную.
  5. Переключите способ отправки в Центре расследований и сохраните изменения.
  6. На сервере базы данных Traffic Monitor нормализуйте табличные пространства (ТП).

Нормализация табличных пространств

Для лучшего взаимодействия Traffic Monitor с Платформой измените наименование корзин (bucket) с данными. Для этого нормализуйте ТП:

  1. Перейдите в папку сервиса Space Manager:

    Блок кода
    cd /opt/iw/tm5/www/space_manager/
  2. Выполните команду для вывода списка пространств для нормализации:

    Блок кода
    php space_manager tbs:normalize-platform --configpath=/opt/iw/tm5/etc --dry-run
  3. Запустите нормализацию ТП с помощью команды:

    Блок кода
    php space_manager tbs:normalize-platform --configpath=/opt/iw/tm5/etc

    После нормализации у пространств будет изменено наименование в столбце STORAGE_BUCKET_ID.

  4. Вы можете выполнить команду для вывода списка ТП:

    Блок кода
    php space_manager tbs:get --configpath=/opt/iw/tm5/etc/
Заполненные ТП не будут нормализованы. Будут нормализованы только пустые ТП за текущую дату и созданные после выполнения команды
  1. .

Пример списка с недоступными для нормализации и нормализованными ТП:

Image Removed

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

Раскрыть
titleПример заполнения ТП после нормализации:
Примечание
iconfalse

В примере рассмотрено заполнение ТП событиями без нарушений и с нарушениями за неделю 24.11 – 30.11:

  1. В понедельник 24.11 до нормализации в ТП добавлены и отправлены в хранилище события:
    • без нарушений размером 6.98 МБ;
    • с нарушениями размером 14.09 МБ.
  2. Включена отправка событий в реальном времени, затем выполнена нормализация ТП.
  3. Во вторник 25.11 в ТП добавлены события без нарушений размером 11.54 МБ, с нарушениями – 21.15 МБ, .
    С 25.11 по 30.11 в столбце "Размер в хранилище" будет указано:
      • для ТП без нарушений – 11.54 МБ;
      • для ТП с нарушениями – 21.15 МБ.
    Image Removed
  4. В среду 26.11 в ТП добавлены события без нарушений размером 3 МБ, с нарушениями – 25.08 МБ.
    С 25.11 по 30.11, в столбце "Размер в хранилище" будет указано суммарное:
      • для ТП без нарушений – 14.54 МБ;
      • для ТП с нарушениями – 46.23 МБ.
    Image Removed

Настройка отправки событий по расписанию

Если ранее Центр расследований не синхронизировался с Traffic Monitor, то достаточно настроить интеграцию в Центре расследований.

Если ранее была настроена отправка событий в реальном времени: 

  1. На сервере Traffic Monitor используйте утилиту, чтобы переключить способ отправки событий:

    Блок кода
    platform_conf_ctl --fl-set-enabled false --ds-set-enabled false
    Если вы хотите вернуть наименование ТП в столбце STORAGE_BUCKET_ID к значению до нормализации:
  2. На сервере базы данных Traffic Monitor перейдите в папку сервиса Space Manager:

    Блок кода
    cd /opt/iw/tm5/www/space_manager/
  3. Выполните команду:

Блок кода

Наименование корзин (bucket) будет изменено только у пустых ТП и созданных после выполнения команды. Заполненные ТП не будут изменены.

  • Перезапустите службу iw_x2db:

    Блок кода
    languagetext
    systemctl restart iw_x2db
  • Перейдите в Центр расследований и в интеграции с Traffic Monitor отключите загрузку событий в реальном времени.
  • При необходимости измените расписание автоматической синхронизации и сохраните изменения.
  • Подробнее о настройках интеграции в Центре расследований см. Руководство администратора используемого платформенного продукта, статья Интеграция с InfoWatch Traffic Monitor.

    Here is an example of filling TS with and without violations for the week 11/24 – 11/30:

  • On Monday, 11/24, before the normalization, events were added to TS and sent to the storage:
    • without violations – 6.98 MB
    • with violations – 14.10 MB
  • Real-time events pushing was enabled, then TS normalization was performed.
  • On Tuesday, 11/25, 2.34 MB of events without violations were added to TS, and 4.71 MB ofevents with violations.
    From 11/25 until 11/30, the "Storage size" column will display:
      • for TS without violations – 2.34 MB
      • for TS with violations – 4.71 MB
    Image Removed
  • On Wednesday, 11/26, 5,78 MB of events without violations were added to TS, and 17.41 MB of events with violations.
    From 11/25 until 11/30, the "Storage size" column will display the total:
      • for TS without violations – 8.12 MB
      • for TS with violations – 22.12 MB
    Image Removed
  • Configuring scheduled events sending

    If the Investigation Centre has not previously synced with Traffic Monitor, you only need to set up the integration in the Investigation Centre.

    If real-time event pushing was previously configured: 

    1. On the Traffic Monitor server, switch the way of sending events using the utility:

    Sv translation
    languageen

    Starting with version 7.14, Traffic Monitor can send events to the Platform in two ways:

    • According to synchronization settings in the Investigation Centre
    • Real-time pushing

    Sending events in real time helps reduce Traffic Monitor load.

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

    Make sure that Traffic Monitor and Investigation Centre use the same way to load events.

    For the Platform to receive events in real time, its version must be 2.5 or later.

    Якорь
    change_method
    change_method
    Switching the way of sending events

    To switch the way of sending events in Traffic Monitor settings, use the platform_conf_ctl utility on the Traffic Monitor server:

    Блок кода
    languagetext
    platform_conf_ctl --fl-set-enabled <bool> --fl-set-uri <uri> --fl-set-token <token> --fl-set-integration-id <id> --ds-set-enabled <bool> --ds-set-uri <uri> --ds-set-token <token>
    and specify these parameters

    In the command above, specify the following parameters of connection with the platform FactsLoader service:

    ParameterDescription

    --fl-set-enabled--ds-set-enabled

    Enable/disable real-time pushing:

    • true (by default) – enable real-time event pushing
    • false – disable real-time event pushing and send events according to Investigation Centre synchronization settings

    --fl-set-uri

    --ds-set-uri

    URI of Platform host in the following format: http://<host>:<port>, where <host> is the Platform server hostname or IP-address and <port> is the Platform server port.By Default port .Note: if Traffic Monitor uses a separate Data Storage to store its own data, do not specify it. Instead, specify the Data Storage of the Platform to which you want to send eventsis 10104.

    Important!
    In this parameter, you should specify an address of the same Platform node as selected in the "Branch" field of integration with Traffic Monitor in Investigation Centre.
    For details, see the Integration with InfoWatch Traffic Monitor article in the Administration Guide for the Platform product you are using.

    --fl-set-token

    --ds-set-token

    Token for connection with the Platform.

    You can get it in Investigation Centre, Image AddedSettings → System Settings → Global settings, in the Token for Data Storage User field.
    For

    instructions on getting the token

    details, see the Global Settings article in Administration Guide of the Platform product you are using.

    You can set the default

    token by specifying

    value of the token if you did not refresh it. For this, specify --fl-set-token default

    --ds-set-token default

    . For security purposes, it is not recommended to use the default token value.

    --fl-set-integration-id

    Unique

    ID

    identifier of the Platform integration with Traffic Monitor

    . For instructions on getting the ID

    .

    You can copy the integration ID in the Image AddedSettings → System Settings → Integrations section. On the integration tile, click Image Added and select Copy ID. For details, see Integration with InfoWatch Traffic Monitor

     article

    article in the Administration Guide for the Platform product you are using.

    If Traffic Monitor use Data Storage to store its own data, then, in the --fl-set-uri parameter, specify address of the Data Storage server or address of any other Platform server located in the same cluster with Data Storage. The same Data Storage as before will continue to store binary data. Text data will be stored in Traffic Monitor database as before. At the same time, the FactsLoader service will download text contents on its server and store them there for displaying events in Investigation Centre.
    On how to configure connection with a storage, see Настройка соединения с Data Storage.

    If Traffic Monitor does not use Data Storage to store its own data, then, after configuring connection with the FactsLoader service, all data will be stored in the Traffic Monitor DB as before. But, in this case, copies of the data will be stored on the Platform server specified in the --fl-set-uri parameter.

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

    In case of distributed installation, the utility must be run on the server installed with the Interceptors template.

    Example of enabling real-time pushing:

    Блок кода
    languagetext
    platform_conf_ctl --fl-set-enabled true --fl-set-uri http://10.60.23.249:10104  --fl-set-token default --fl-set-integration-id e06bd150-513b-4eb6-975a-533cf96e50ab --ds-set-enabled true --ds-set-uri http://10.60.23.249:40731  --ds-set-token default

    Command to disable real-time pushing and switch to scheduled sending:

    Блок кода
    platform_conf_ctl --fl-set-enabled false --ds-set-enabled false
    Switching algorithm

    Configuring real-time pushing

    To configure real-time pushing:

    1. In the Investigation Centre, copy the integration ID.
    2. On the Traffic Monitor server, switch the way of sending events using the utility.
    3. Restart the iw_x2db service:

      Блок кода
      languagetext
      systemctl restart iw_x2db
    4. Go to the Investigation Centre. For the System to display events between the last synchronization and until switching to real-time pushing, start the synchronization manually.
    5. In the Investigation Centre, switch the way of sending events and save the changes.
    6. Normalize tablespaces (TS) on the Traffic Monitor database server.

    Tablespace normalization

    To ensure better interaction between Traffic Monitor and the Platform, change the name of data buckets
    1. .
    To do this, normalize TS:
    1. Go to the Space Manager service folder:

      Блок кода
      cd /opt/iw/tm5/www/space_manager/
    2. Run the command to display the list of TS to normalize:

      Блок кода
      php space_manager tbs:normalize-platform --configpath=/opt/iw/tm5/etc --dry-run
    3. Run the TS normalization using the command:

      Блок кода
      php space_manager tbs:normalize-platform --configpath=/opt/iw/tm5/etc

      After the normalization, TS will have their names changed in the STORAGE_BUCKET_ID column.

    4. You can run the command to display the TS list:

      Блок кода
      php space_manager tbs:get --configpath=/opt/iw/tm5/etc/

    Filled TS will not be normalized. Only empty TS for the current date and those created after you run the command will be normalized.

    Example of a list with non-normalized and normalized TS:

    Image Removed

    Traffic Monitor and the Platform use different data storage methods. Since the Platform has weekly data records, after normalization, the "Storage size" for the entire current week will be filled in the Traffic Monitor for TS with events with and without violations. The total size will be displayed for all these TS. If there were non-normalized TS during the current week, their value will not be included in the total. For TS with screenshots, the "Storage size" will continue to be filled on a daily basis, as it was before the normalization.

    Раскрыть
    titleExample of filling after the normalization:
    Примечание
    iconfalse
    Блок кода
    platform_conf_ctl --fl-set-enabled false --ds-set-enabled false
    If you want to return the TS name in the STORAGE_BUCKET_ID column to the value before the normalization:
  • On the Traffic Monitor database server, go to the Space Manager service folder:

    Блок кода
    cd /opt/iw/tm5/www/space_manager/
  • Run the command:

    Блок кода
    php space_manager tbs:normalize-platform --configpath=/opt/iw/tm5/etc
    The bucket name will be changed only for empty TS and those created after executing the command. The filled TS will not be changed. 
  • Restart the service iw_x2db:

    Блок кода
    languagetext
    systemctl restart iw_x2db
  • Go to the Investigation Centre and disable the real-time event loading in the integration with Traffic Monitor.
  • If necessary, change the automatic synchronization schedule and save the changes.
  • For more information about integration settings in the Investigation Centre, see Integration with InfoWatch Traffic Monitor article in Administration Guide for the Platform product you are using.