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

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

Ключ

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

Чтобы обновить файл регистрации стороннего компонента:

  1. Удостоверьтесь, что в Traffic Monitor уже зарегистрирован плагин со значением поля "PLUGIN_ID", равным аналогичному значению у нового плагина.
    Информацию обо всех зарегистрированных плагинах можно найти в таблице plugin базы данных. Подробнее о работе с БД базой данных см. в статье "Администрирование базы данных".
  2. Создайте новую версию manifest-файла плагина. Для этого внесите необходимые изменения в исходный manifest-файл.

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

    При обновлении плагина не рекомендуется изменять название сервиса, т.е. значение поля "SERVICE_MNEMO", так как в этом случае будет создан новый тип события в Traffic Monitor, а события, перехваченные старым плагином, не будут ассоциированы с плагином с новым значением "SERVICE_MNEMO".

    Если вы хотите изменить название типа события, отображаемое в веб-интерфейсе Traffic Monitor, отредактируйте поле "LOCALE".

    Если вы измените поле "SERVICE_MNEMO" и при этом не измените поле "LOCALE", то в Traffic Monitor будут существовать два типа события с одинаковыми именами. В Консоли Управления Traffic Monitor их нельзя будет отличить друг от друга.

  3. Загрузите новый плагин в Консоль Управления управления Traffic Monitor.

Удаление дублирующих типов событий

Если вы добавили в Traffic Monitor несколько типов события с разными именами сервиса ("SERVICE_MNEMO"), но с одинаковыми отображаемыми именами ("LOCALE"), вы можете устранить дублирование, удалив из базы данных информацию о неактуальных типах события. При этом можно удалить не весь плагин, а только созданный им тип события, который привел к дублированию.

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

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

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

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

Удаление дублирующего типа события приведет к тому что, в Консоли Управления управления Traffic Monitor события этого типа и политики безопасности, использующие этот тип, будут отображаться некорректно. Результаты запросов, которые должны содержать события удаленного типа, не будут отображаться.

Если дублирующий тип события используется в Traffic Monitor, вы можете:

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

Рассмотрим процедуру удаления на примере плагина с типом события "im_my_chat" из статьи "Пример файла регистрации стороннего компонента". Для демонстрации плагин был некорректно обновлен дважды. Поле "SERVICE_MNEMO" имело значение "im_my_chat_new" и "im_my_chat_final". Поле "LOCALE" имело значение "Новый сервис" во всех случаях. В результате возникло дублирование. Например, при создании запроса в разделе События Консоли Управления управления Traffic Monitor стали отображаться три типа события Новый сервис:

Чтобы удалить дублирующие типы события:

  1. В таблице plugin базы данных найдите идентификаторы плагинов, которые создали дублирование. Эти идентификаторы записаны в поле plugin_id.
    В нашем примере всего одна строка с таким плагином:
  2. Найдите идентификаторы типов события и сервисов, созданных этими плагинами. Для этого:
    1. В таблице plugin_data найдите все данные для этих плагинов. Это можно сделать с помощью SQL-запроса следующего вида:

      Блок кода
      languagesqltext
      SELECT * FROM iwtm.plugin_data
      WHERE plugin_id in ('4B8038D390396EB6E0540100007F1CA200000001')
      ORDER BY plugin_id

      Если дублирующих плагинов несколько, то укажите их значения поля plugin_id в скобках через запятую.
      Результат запроса для нашего примера:

    2. В полученных данных найдите для каждого значения plugin_id те строки, в которых значение поля entry_type равно OBJECT_TYPE_OBJECT_TYPE_ID или OBJECT_TYPE_SERVICE_ID. Запомните пары значений этих полей. Это идентификатор типа события, созданного дублирующим плагином, и идентификатор сервиса.
      В таблице из примера была найдена одна пара. В ней:

      Блок кода
      languagetext
      OBJECT_TYPE_OBJECT_TYPE_ID = "FAF6B5B261204B31BEED5F67798A477C00000000"

      
      OBJECT_TYPE_SERVICE_ID = "DD6ECB5227DA11E2B507CBDB6088709B00000000"
  3. В таблице object_type найдите записи с парами идентификаторов из предыдущего пункта.
    Вы можете использовать для этого запрос следующего вида:

    Блок кода
    languagesqltext
    SELECT * FROM iwtm.object_type
    WHERE object_type_id = 'FAF6B5B261204B31BEED5F67798A477C00000000'
      AND service_id = 'DD6ECB5227DA11E2B507CBDB6088709B00000000'

  4. По полю mnemo определите пару идентификаторов, которая относится к актуальному плагину.
    Если эта пара единственная, то перейдите к п. 6.
    В нашем примере поле mnemo у найденных записей имеет значение "im_my_chat_final", т.е. записи относятся к актуальному плагину.
  5. Для каждой пары, не относящейся к актуальному плагину, выполните следующие действия:
    1. Убедитесь, что в таблице object нет событий с типом события из этой пары. Для этого выполните запрос, используя значения пары идентификаторов – OBJECT_TYPE_ID и SERVICE_ID:

      Блок кода
      languagesqltext
      SELECT count(*) FROM object
      WHERE object_type_code='<OBJECT_TYPE_ID>'
      AND service_code='<SERVICE_ID>'

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

      Предупреждение
      titleВажно!
      Если в таблице object есть события этого типа, но вы все равно хотите удалить его, рекомендуется сначала удалить ежедневные табличные пространства, содержащие события этого типа, или обратиться в службу технической поддержки.
      Подробнее об удалении ежедневных табличных пространств см. в разделе "Администрирование базы данных".
    2. Из таблицы object_type удалите записи, связанные с данным типом события. Это записи, найденные в п.3.
    3. Из таблицы plugin_data удалите записи, связанные с данным типом события. Например, это могут быть:
      • идентификатор типа события – "OBJECT_TYPE_OBJECT_TYPE_ID";
      • идентификатор сервиса – "OBJECT_TYPE_SERVICE_ID";
      • название типа события – "OBJECT_TYPE_MNEMO".
  6. В таблице object_type найдите записи, относящиеся к дублирующим типам события. Для этого выполните следующий запрос:

    Блок кода
    languagesqltext
    SELECT * FROM iwtm.object_type
    WHERE display_name = '<EVENT_TYPE_DISPLAY_NAME>'

    где <EVENT_TYPE_DISPLAY_NAME> – отображаемое имя типа события.
    В нашем примере запрос будет иметь следующий вид:

    Блок кода
    languagesqltext
    SELECT * FROM iwtm.object_type
    WHERE display_name = 'Новый сервис'

  7. По полю mnemo определите дублирующие типы события.
    В нашем случае "im_my_chat_final" – это тип события актуального плагина. Значит "im_my_chat" и "im_my_chat_new" – это старые дублирующие типы, которые мы и хотим удалить.
  8. Для каждого дублирующего типа события:
    1. Убедитесь, что в таблице object нет событий с этим типом. Порядок действий аналогичен п. 5а данной инструкции.
    2. В таблице object_type найдите и удалите все записи, относящиеся к данному типу. Они будут отличаться только локализацией, т.е. значениями полей language и display_name.
      Для этого можно использовать запрос:

      Блок кода
      languagesqltext
      SELECT * FROM iwtm.object_type
      WHERE mnemo = '<MNEMO>'

      Например, для типа "im_my_chat" будут выведены следующие записи:
      Image Removed, для типа "im_my_chat" будут выведены следующие записи:
      Image Added

  9. Запустите процедуру обновления списка объектов базы данных.

    Для этого:

    • Если вы используете СУБД PostgreSQL, Postgres Pro Enterprise или Jatoba, выполните команду:

      Блок кода
      languagetext
      SELECT sp_populate_configuration('bookworm');
    • Если вы используете СУБД Oracle, выполните команду:

      Блок кода
      languagetext
      begin
          sp_populate_configuration('bookworm');
      end;

  10. Убедитесь, что дублирующие типы события отсутствуют в Консоли Управления управления Traffic Monitor.
Sv translation
languageen

To update the third-party registry file:

  1. Make sure that, in Traffic Monitor, there is an already registered plugin with the same value of the "PLUGIN_ID" field as the new plugin has.
    You can find the information about all registered plugins in the plugin table of the database. For details on working with a database, see "Администрирование базы данных".
  2. Create the new version of the manifest file of the plugin. For this, make the necessary changes to the initial manifest file.

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

    When updating plugin, it is not recommended to change service name, i.e. the value of the "SERVICE_MNEMO" field. Because, in this case, a new event type will be created in Traffic Monitor and the events intercepted by old plugin will not be associated with the plugin, that has a new value of the "SERVICE_MNEMO".

    If you want to change the event type name that is displayed in the Traffic Monitor web interface, edit the "LOCALE" field.

    If you change the "SERVICE_MNEMO" field and, at the same time, not change the "LOCALE" field, then, in Traffic Monitor, there will be two event types with the same names. In Traffic Monitor Management Console, they cannot be distinguished from each other.

  3. Upload the new plugin to the Traffic Monitor Management Console.

Deletion of duplicating event types

If you have added several event types with different service names ("SERVICE_MNEMO") but with same displayed names ("LOCALE") to Traffic Monitor, you can resolve duplication by deletion the information on irrelevant event types from the database. In doing so, you can delete not the entire plugin but only the event type created by it and caused the duplication.

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

Perform deletion of information from the database carefully. Deletion information by mistake can cause incorrect work of the System.

Before deletion, it is recommended to create backup copies of database and tables.

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

Deletion of duplicating event type will cause incorrect displaying of events of this event type and security policies using this event type. Results of queries that must contain events of the deleted type will not be displayed.

If duplicating event type is used in Traffic Monitor, you can:

  • Not delete it, but change the displayed name of the new event type by correctly updating plugin.
  • Wait for storage period of the events of the duplicating type to expire. Then delete this event type from the database.

Let's look at the deletion procedure with the example of the plugin with the "im_my_chat" event type from the "Пример файла регистрации стороннего компонента" article. To demostratedemonstrate, we have incorrectly updated the plugin twice. The "SERVICE_MNEMO" field had "im_my_chat_new" and  and "im_my_chat_final" values. The "LOCALE" field had the "New service" value in all cases. As a result, the duplication has occurred. For example, when you create a query in the Events section of Traffic Monitor Management Console, you can see three New service event types:

To delete duplicating event types:

  1. In the plugin table of the database, find identifiers (ID) of the plugins that caused duplication. This identifiers are recorded in the plugin_id field.
    In our example, there is only one record with such a plugin:
  2. Find identifiers of the event types and services created by these plugins. For this:
    1. In the plugin_data table, find all data for these plugins. You can do it using SQL query of the following type:

      Блок кода
      languagesqltext
      SELECT * FROM iwtm.plugin_data
      WHERE plugin_id in ('4B8038D390396EB6E0540100007F1CA200000001')
      ORDER BY plugin_id

      If there are several duplicating plugins, then specify their plugin_id field values in brackets, separated by commas.
      Result of the query in our example:

    2. In the obtained data, for each plugin_id value, find those records where entry_type field value equals OBJECT_TYPE_OBJECT_TYPE_ID or OBJECT_TYPE_SERVICE_ID. Remember the pairs of the values of these fields. It is identifier of the event type created by duplicating plugin and identifier of the service.
      In the table from the example, one pair is found. It contains the following values:
      OBJECT_TYPE_OBJECT_TYPE_ID = "FAF6B5B261204B31BEED5F67798A477C00000000"
      OBJECT_TYPE_SERVICE_ID = "DD6ECB5227DA11E2B507CBDB6088709B00000000"
  3. In the object_type table, find records with the pairs of identificators from the previous step.
    For this, you can use the following query:

    Блок кода
    languagesqltext
    SELECT * FROM iwtm.object_type
    WHERE object_type_id = 'FAF6B5B261204B31BEED5F67798A477C00000000'
      AND service_id = 'DD6ECB5227DA11E2B507CBDB6088709B00000000'

  4. On the mnemo field, determine a pair of identifiers that refers to the relevant plugin.
    If there is the only one pair, then go to the 6 step.
    In our example, found records have "im_my_chat_final" value of the mnemo field. It means that these records refer to the relevant plugin.
  5. For each pair that does not refer to the relevant plugin, perform the following actions:
    1. Make sure that, in the object table, there are no events of the event type from this pair. For this, run the query using the values of the pair of the identifiers – OBJECT_TYPE_ID and SERVICE_ID:

      Блок кода
      languagesqltext
      SELECT count(*) FROM object
      WHERE object_type_code='<OBJECT_TYPE_ID>'
      AND service_code='<SERVICE_ID>'

      If the result of the query equals zero, then there are no events.

      Предупреждение
      titleWarning!
      If, in the object table, there are events of this event type but you want to delete it anyway, it is recommended to delete all events of this type from this table first.
    2. From the object_type table, delete records related to this event type. These are the records found in the step 3.
    3. From the plugin_data table, delete records related to this event type. For instance, these can be:
      • event type identifier – "OBJECT_TYPE_OBJECT_TYPE_ID"
      • service identifier – "OBJECT_TYPE_SERVICE_ID"
      • event type name – "OBJECT_TYPE_MNEMO"
  6. In the object_type table, find the records related to the duplicating event types. For this, run the following query:

    Блок кода
    languagesqltext
    SELECT * FROM iwtm.object_type
    WHERE display_name = '<EVENT_TYPE_DISPLAY_NAME>'

    where <EVENT_TYPE_DISPLAY_NAME> – the displayed name of the event type.
    In our example, the query will be as follows:

    Блок кода
    languagesqltext
    SELECT * FROM iwtm.object_type
    WHERE display_name = 'New service'

  7. On the mnemo field, determine duplicating event types.
    In our case, "im_my_chat_final" is an event type of the relevant plugin. It means that "im_my_chat" and "im_my_chat_new" are old duplicating types which we want to delete.
  8. For each duplicating event type:
    1. Make sure that, in the object table there are no event of this type. Follow a procedure similar to step 5а of this instruction.
    2. In the object_type find and delete all records related to this type. They differ from each other only in localization, i.e. in values of the language and display_name fields.
      For this, you can use the following query:

      Блок кода
      languagesqltext
      SELECT * FROM iwtm.object_type
      WHERE mnemo = '<MNEMO>'

      For instance, for the "im_my_chat" event type, the following records will be displayed:

  9. Run the procedure of updating database object list. For this:

    • If you use the PostgreSQL DBMS, run the command:

      Блок кода
      languagesqltext
      SELECT sp_populate_configuration('bookworm');
    • If you use the Oracle DBMS, run the command:

      Блок кода
      languagesqltext
      begin
          sp_populate_configuration('bookworm');
      end;
  10. Make sure that duplicating event types are absent in Traffic Monitor Management Console.