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

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

Ключ

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

Файл конфигурации indexer.conf

Scroll Table Layout
widths60%,40%

СодержимоеОписание
{
 
    "Bookworm": {...}

см. Общая секция Bookworm

    "DebugBreak": false, 
Посылать ли SIGTRAP (SIGBREAK на Windows) при обработке любого исключения. Служит для отладки
    "Indexer": {

В файле хранится конфигурация модуля индексации. Параметры индексации применяются к модулю iw_indexer.

В секции Indexer заданы параметры работы модуля с Базой Данных и методы индексации:
        "ArchiveDir": "sphinx_archive", 
Путь к каталогу архивированных индексов. Если построение расширенного индекса по областям события отключена (false), то слова,  найденные полнотекстовым поиском, подсвечены не будут.
        "BuildIndexByContent": true, 
Расширенная индексация. Если построение расширенного индекса по областям события отключена (false), то слова,  найденные полнотекстовым поиском, не будут подсвечены на КФП (краткая форма показа данных события).
Контентный индекс. Используется, чтобы подсветить нужный контент в дереве контентов события на ДФП. Настройка автоматически выключается при использовании зонального индекса
        "BuildIndexZoned": false, 
Зональный индекс. Если включен - новые табличные пространства будут индексироваться только в зональном индексе. Имеющиеся старые индексы будут сохранены.
        "DBPrefetchRowCount": 131072, 
Количество строк, извлекаемых из БД за 1 раз.
        "DebugNoCleanTemp": false, 
Не удалять временные файлы .xmlpipe2. (Использовать true только для отладки).
        "ExpireDeltaSecs": 43200,
Время, спустя которое удаляются дельта-индексы после добавления новых ТП.
        "FetchConcurrency": 0, 

Количество соединений с БД и потоков для загрузки текстовых объектов и формирования xmlpipe2-файлов. Значение по умолчанию: 0 (по умолчанию равно ProcManConcurrency, поделённому на число строящихся видов индекса (зональный индекс не учитывается):

  • только общий индекс;
  • общий индекс и индекс по содержимому.
        "FetchSize": 1200, 
Количество объектов, запрашиваемых службой из БД для последующей индексации. 
        "IgnoreMalaysianDict": true, 
Отключение малайской морфологии.
        "IndexExactWords": false, 

Точное совпадение. Значение параметра влияет на compatible magic индекса - т.е. переиндексирование не требуется и не происходит, но новые документы складываются в другие индексы и поиск работает как в новых, так и в старых файлах индексов.Возможность использования запросов без морфологии. Включение этой опции (true) снижает скорость индексации и увеличивает размер индексов и расход ОЗУ

        "IndexRotateTimeoutInMs": 60000, 
Время, за которое индекс должен быть подвергнут ротации (мс).
        "MinWordLen": 1,

Параметр влияет на значение параметра min_word_len в конфигурации индексов searchd. Значение параметра определяет минимальную длину слова, которое будет индексировано. Слова короче этого значения не попадают в индекс, поиск по таким словам невозможен, но, тем не менее, продолжают влиять на расстояние между индексируемыми словами, что необходимо учитывать при составлении поисковых запросов с точным порядком следования слов.

Экспериментальный параметр. Ожидается, что значение 2 или 3 поможет немного уменьшить размер файлов индексов без значительного ухудшения качества поиска. Диапазон значений: от 1 до 42.

Значение параметра влияет на compatible magic индекса - т.е. переиндексирование не требуется и не происходит, но новые документы складываются в другие индексы и поиск работает как в новых, так и в старых файлах индексов.

        "PipeDir": "tmp/sphinx", 
Директория для временных файлов, необходимых для построения индекса.
        "ProcManConcurrency": 0, 
Максимальное количество одновременно запущенных процессов индексирования  (по умолчанию определяется автоматически и равно числу ядер процессора) .
        "SearchdPath": "/opt/iw/tm5/bin/searchd", 
Путь до демона searchd. Может отличаться в зависимости от RHEL или Astra Linux. 
        "ServicePath": "/sbin/service", 
Путь до скрипта service
        "SphinxBaseDir": "/var/lib/sphinx", 
Директория для файлов индексов демона searchd. Значение по умолчанию: /var/lib/sphinx
        "SphinxConfigDir": "etc/sphinx", 
Директория для генерируемых конфигурационных файлов демона searchd. Значение по умолчанию: etc/sphinx
        "SphinxTMConfigPath": "etc/sphinx.conf", 
Путь к общесистемной конфигурации Sphinx. Значение по умолчанию: etc/sphinx.conf
        "TarPath": "/bin/tar", 
Путь к утилите архивации. Значение по умолчанию: /bin/tar
        "TextPrefetchSizeInMb": 1024, 
Ограничение размера объекта на индексацию. Значение по умолчанию: 1024
        "WaitTimeInSecs": 30,
Время ожидания между попытками получить объекты из БД. Значение по умолчанию: 30 
        "CharTable": "" 
Таблица символов. Параметр включается опционально. Будет использоваться при наличии в конф. файле. В случае отсутствия будет сгенерирована таблица символов по умолчанию ("0..9, _, a..z, U+430..U+44F, U+451, A..Z->a..z, U+401->U+451, U+410..U+42F->U+430..U+44F").
    }, 
 
    "Logging": {...}
см. Общая секция Logging
    "NookDir": "/opt/iw/tm5", 

В секции указывается рабочий каталог модуля. По умолчанию – /opt/iw/tm5.

    "UnsafeSignalHandlers":false
Поддержка работы с необрабатываемыми сигналами. По умолчанию выключена (false). При установке значения true позволяется устанавливать в коде обработчики "небезопасных" сигналов (например, SIGSEVG). Добавлять, включать/выключать данную настройку не рекомендуется без предварительной консультации с разработчиками.
}
 

Unit-файл iw_indexer.service 

Scroll Table Layout
widths50%, 50%

Код
Описание

[Unit]

Раздел для определения метаданных демона и настройки его взаимодействия с другими демонами
Description=InfoWatch Traffic Monitor Indexer

Название демона

After=network-online.service iwtm-consul.service  postgresql-9.6.service oracle.serviceДемоны, которые будут запущены до запуска текущего демона
  
[Service]Раздел настройки запуска демона

Type=simple

Тип запуска демона. simple - демон запускается и переходит в режим ожидания на консоли

PermissionsStartOnly=true

Запуск команд из ExecStartPre под пользователем root

ExecStartPre=/bin/bash /opt/iw/tm5/bin/check_coredumps.sh -d iw_indexer

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

ExecStart=/opt/iw/tm5/bin/iw_indexer -p /opt/iw/tm5/etc --backend $DB_BACKEND

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

ExecStop=/bin/kill -s SIGQUIT $MAINPID

Команда для остановки демона. Если не указано, процесс будет немедленно уничтожен, когда демон будет остановлен. Запускается от пользователя, указанного в User

ExecReload=/bin/kill -s SIGHUP $MAINPID

Команда для перезагрузки конфигурации демона, если она доступна. Запускается от пользователя, указанного в User

Restart=on-failure

Команда для рестарта демона, если он остановится или упадет. Значение on-failure означает, что демон будет перезапускаться, если он остановился с ненулевым кодом возврата или был завершен по сигналу (kill <pid_демона>)

RestartSec=5

Время ожидания перед попыткой перезапуска демона

RestartPreventExitStatus=SIGKILL

Команда, по которой можно принудительно завершить работу демона

TimeoutStopSec=0

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

User=iwtm

Имя пользователя, от которого осуществляется запуск демона

Group=iwtm

Имя группы пользователя

LimitNOFILE=584000

Максимальное количество открытых файлов

LimitFSIZE=infinity

Максимальный размер файла (КБ). infinity - без ограничений

LimitNPROC=65536

Максимальное количество процессов

LimitCORE=infinity

Ограничение на размер coredump-файла (КБ)

LimitMEMLOCK=infinity

Максимальное заблокированное в памяти адресное пространство (КБ)

EnvironmentFile=-/etc/default/iwtm

Путь к файлу окружения
  

[Install]

Определение поведения демона, если он включен или отключен

WantedBy=multi-user.target

Запускать этот демон, когда система грузится в multi-user режиме
Sv translation
languageen

The indexer.conf configuration file:

Scroll Table Layout
widths60%,40%

ContentDescription
{
 
    "Bookworm": {...}

see  General section Bookworm

 

    "DebugBreak": false, 
If SIGTRAP should be sent (SIGBREAK to Windows) while any exception handling. Used for debugging purposes.
    "Indexer": {

Indexer configuration is stored in the file. Indexing parameters are applied to iw_indexer module.

In the Indexer section interaction with DB parameters and indexing methods are specified.
        "ArchiveDir": "sphinx_archive", 
Path to the archived indexes directory. If the working index construction as per event areas is disabled (false), the words, found via full-text search will not be highlited.
        "BuildIndexByContent": true, 
Enable extended indexing. If the working index construction as per event areas is disabled (false), the words found via full-text search will not be highlited in short form previewContent index. Used to highlight required content within the event content tree in detailed form of preview. Configuration is automatically enabled when zonal index is used.
"BuildIndexZoned": false,Zonal index. Once enabled - new tablespaces are to be indexed only within the zonal index. All the rest old indexes will be stored.
        "DBPrefetchRowCount": 131072, 
Number of rows, fetched from DB at a time.
        "DebugNoCleanTemp": false, 
Do not delete temporary files .xmlpipe2. (Use true only for debugging purposes).
        "ExpireDeltaSecs": 43200,
After this period of time delta indexes are being deleted since the new tablespaces were added.
        "FetchConcurrency": 0, 

Number of connections with DB and streams for text objects loading and xmlpipe2 files generation. Default value: 0 (is equal to ProcManConcurrency, divided into the number of index types being under construction ( zonal index is not taken into consideration):

  • general index only;
  • general index and index by contents.
        "FetchSize": 1200, 
Number of objects, requested from DB by the service for later indexing .
        "IgnoreMalaysianDict": true, 
Disable malaysian morphology.
        "IndexExactWords": false, 
Exact match. The value affects the compatible magic index, i.e. reindexing is not required and not performed, but new documents are added to other indexes and the search does work in new and old index files
": false, 

Possibility to make requests without consideration of morphology. Enabling this option (true) decreases the speed of indexing and increases the size of indexes and RAM consumption.

        "IndexRotateTimeoutInMs": 60000, 
Index rotation time (msec).
        "MinWordLen": 1,

The parameter affects the min_word_len value in the index configuration searchd. The value of the parameter determines the minimum word length to be indexed. If the length of a word is shorter than the value, the search by these words does not work. Nonetheless, it affects the indexed word distance, thus, it should be considered, when constructing search queries with the exact phrase match.

Experimental parameter. It is expected that the 2 or 3 value will help to decrease the index file size with no sacrifice of search quality. Range: from 1 to 42.

Exact match. The value affects the  compatible magic  index, i.e. reindexing is not required and not performed, but new documents are added to other indexes and the search does work in new and old index files.

        "PipeDir": "tmp/sphinx", 
Temporary files directory needed for index construction.
        "ProcManConcurrency": 0, 
Maximum number of concurrently started indexing processes (automatically determine from the number of CPU cores and equal to it).
        "SearchdPath": "/opt/iw/tm5/bin/searchd", 
Path to searchd. It can be different depending on RHEL or Astra Linux.
        "ServicePath": "/sbin/service", 
Path to the service script.
        "SphinxBaseDir": "/var/lib/sphinx", 
Directory for the searchd daemon index files. Default value: /var/lib/sphinx
        "SphinxConfigDir": "etc/sphinx", 
Directory for the searchd daemon generated configuration files. Default value: etc/sphinx
        "SphinxTMConfigPath": "etc/sphinx.conf", 
Path to Sphinx systemic configuration. Default value: etc/sphinx.conf
        "TarPath": "/bin/tar", 
Path to a file archiver. Default value: /bin/tar
        "TextPrefetchSizeInMb": 1024, 
Indexed object size limit. Default value: 1024
        "WaitTimeInSecs": 30
Time between attempts to retrieve objects from BD. Default value: 30 
        "CharTable": "" 
Table of symbols. Parameter enabling is optional. To be used when it is contained within the configuration file. Once is absent, the table of symbols is to be generated by default ( "0..9, _, a..z, U+430..U+44F, U+451, A..Z->a..z, U+401->U+451, U+410..U+42F->U+430..U+44F" ).
    }, 
 
    "Logging": {...}
see General section Logging
    "NookDir": "/opt/iw/tm5", 

In this section the module working directory is specified. By default –  /opt/iw/tm5

  "UnsafeSignalHandlers":false
Unhandled signals support. Disabled by default (false). Once true is set, it is allowed to use unsafe handlers in code (e.g. SIGSEVG). Adding, enabling/disabling this parameter is not recommended without consultation with developers.
}
 

The iw_indexer.service unit file:

Scroll Table Layout
widths50%, 50%

CodeDescription

[Unit]

A section where the daemon metadata is determined and interaction settings with other daemons are specified
Description=InfoWatch Traffic Monitor Indexer

Daemon name

After=network-online.service iwtm-consul.service  postgresql-9.6.service oracle.serviceDaemons that will be started before the current one
  
[Service]A section where the daemon start settings are specified

Type=simple

Daemon start type. simple - the daemon is started and goes into standby on the console

PermissionsStartOnly=true

Running commands from ExecStartPre under root

ExecStartPre=/bin/bash /opt/iw/tm5/bin/check_coredumps.sh -d iw_indexer

The full path and arguments of the command that should be executed before the main process is started

ExecStart=/opt/iw/tm5/bin/iw_indexer -p /opt/iw/tm5/etc --backend $DB_BACKEND

The full path and command arguments that should be executed before starting the daemon. The command is run under user specified in the User field

ExecStop=/bin/kill -s SIGQUIT $MAINPID

A command to stop the daemon. If the command is not specified, the process will be killed once the daemon is stopped. The command is run under user specified in the User field

ExecReload=/bin/kill -s SIGHUP $MAINPID

A command that reloads the daemon configuration if it is available. The command is run under user specified in the User field

Restart=on-failure

A command that restarts the daemon when it stops or crashes. The on-failure value indicates that the daemon will be restarted if it has stopped with a non-zero return code or was ended by signal (kill <daemon_pid>)

RestartSec=5

A timeout before attempting to restart the daemon

RestartPreventExitStatus=SIGKILL

A command that forcibly ends the daemon operation

TimeoutStopSec=0

The time during which the system waits for the signal to stop before marking the process as unavailable or terminated

User=iwtm

The name of the user under whose account the daemon is started

Group=iwtm

Name of the user group

LimitNOFILE=584000

The maximum number of open files

LimitFSIZE=infinity

The maximum size of a file (KB). The infinity value means that the size is unlimited

LimitNPROC=65536

The maximum number of processes

LimitCORE=infinity

Limit for core dump size (KB)

LimitMEMLOCK=infinity

The maximum size of memory locked address space (KB)

EnvironmentFile=-/etc/default/iwtm

Path to the environment file
  

[Install]

Defines the behavior of a daemon when it is enabled/disabled

WantedBy=multi-user.target

Start the daemon when the system is loaded in multi-user mode