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

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

Ключ

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

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

Scroll Table Layout
widths60%,40%

СодержимоеОписание
{
 
    "Ident": {
Описание настроек для провайдера данных (из LDAP, DNS).
        "CacheTTL": 60
Время валидности данных iw_ident.
    }, 
 
    "Logging": {...}
см. Общая секция Logging
    "ThriftServers": {...}
см. Общая секция ThriftServers
    "NookDir": "/opt/iw/tm5", 

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

    "UnsafeSignalHandlers":false
Поддержка работы с необрабатываемыми сигналами. По умолчанию выключена (false). При установке значения true позволяется устанавливать в коде обработчики "небезопасных" сигналов (например, SIGSEVG). Добавлять, включать/выключать данную настройку не рекомендуется без предварительной консультации с разработчиками.
    "Bookworm": {...}
см. Общая секция Bookworm
    "ContextUnwinder": {
Правила обработки контекстов. По большей части сгруппированы по сервису, типу объекта и протоколу
        "ContextRules": "etc/rules.xml", 
Предустановленные правила обработки контекстов
        "ContextCustomRules": "etc/custom_rules.xml"
Кастомные правила обработки контекстов
    }, 
 
    "Lua": {
 
        "Headers": "etc/config/lua/vademecums/headers.list", 
Справочник используемых заголовков
        "Vademecums": {
Справочники идентификации
            "Perimeters": "etc/config/lua/vademecums/perimeters.bin", 
Справочник для идентификации периметров
            "GroupMembersCount": "etc/config/lua/vademecums/group_members_count.bin", 
Справочник членов групп
            "WorkstationContacts": "etc/config/lua/vademecums/workstation_contacts.bin", 
Справочник рабочих станций
            "PersonContacts": "etc/config/lua/vademecums/person_contacts.bin", 
Справочник контактов персоны
            "PerimeterWorkContacts": "etc/config/lua/vademecums/perimeter_work_contacts.bin", 
Справочник для идентификации периметров по рабочим контактам персон и групп.
            "Applications": "etc/config/lua/vademecums/applications.bin", 
Справочник приложений
            "Groups": "etc/config/lua/vademecums/groups.bin", 
Справочник групп
            "Webform": "etc/config-perm/lua/vademecums/webform.bin", 
Справочник web-форм (используется для разметки содержимого POST-запросов).
            "IdentityStatus": "etc/config/lua/vademecums/identity_status.bin", 
Статус элемента идентификации (например, "Под наблюдением", "На испытательном сроке" и т.д.)
            "GroupContacts": "etc/config/lua/vademecums/group_contacts.bin", 
Справочник контактов групп.
            "Resources": "etc/config/lua/vademecums/resources.bin"
Список web-ресурсов по категориям.
        }, 
 
        "MaxThreads": 8, 
Максимальное число потоков обработки.
        "UserScript": "etc/scripts/process.lua", 
Пользовательский lua-скрипт. Выполняется после системного.
        "SystemScript": "etc/scripts/system.lua",
Системный lua-скрипт.
        "SessionTimeoutInSec": 60,
Время жизни сессии, если к ней не было обращений в течение указанного времени (в секундах). Если значение "0", то сессия удалена не будет. Значение по умолчанию: 60.
        "DumpConf": {}
Секция настройки фильтрации luaengined-дампов. Подробнее в статье Фильтрация luaengined-дампов
    }, 
 
    "DebugBreak": false, 
Посылать ли SIGTRAP (SIGBREAK на Windows) при обработке любого исключения. Служит для отладки
}
 

Unit-файл iw_luaengined.service 

Scroll Table Layout
widths50%, 50%

Код
Описание

[Unit]

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

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

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

Type=simple

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

PermissionsStartOnly=true

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

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

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

ExecStart=/opt/iw/tm5/bin/iw_luaengined -p /opt/iw/tm5/etc

Полный путь и аргументы команды, которая должна быть выполнена для запуска демона. Запускается от пользователя, указанного в 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=32768

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

LimitFSIZE=infinity

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

LimitNPROC=65536

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

LimitCORE=infinity

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

LimitMEMLOCK=infinity

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

 

 
  

[Install]

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

WantedBy=multi-user.target

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

luaengined.conf configuration file

Scroll Table Layout
widths65%,35%

ContentDescription
{
 
    "Ident": {
Description of settings for data provider( LDAP, DNS).
        "CacheTTL": 60
Data validity time iw_ident.
    }, 
 
    "Logging": {...}
see General section Logging
    "ThriftServers": {...}
see General section ThriftServers
    "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.
    "Bookworm": {...}
see General section Bookworm
    "ContextUnwinder": {
Contex processing rules. Mostly they are groupped by service, object type and protocol.
        "ContextRules": "etc/rules.xml", 
Preset contex processing rules.
        "ContextCustomRules": "etc/custom_rules.xml"
Custom rules of contex processing.
    }, 
 
    "Lua": {
 
        "Headers": "etc/config/lua/vademecums/headers.list", 
Used headers guide.
        "Vademecums": {
Identification guides.
            "Perimeters": "etc/config/lua/vademecums/perimeters.bin", 
Perimeters identification guide.
            "GroupMembersCount": "etc/config/lua/vademecums/group_members_count.bin", 
Group membership guide.
            "WorkstationContacts": "etc/config/lua/vademecums/workstation_contacts.bin", 
Workstations guide.
            "PersonContacts": "etc/config/lua/vademecums/person_contacts.bin", 
Person's contacts guide.
            "PerimeterWorkContacts": "etc/config/lua/vademecums/perimeter_work_contacts.bin", 
Guide to identify perimeters by person's working contacts and groups.
            "Applications": "etc/config/lua/vademecums/applications.bin", 
Applications guide.
            "Groups": "etc/config/lua/vademecums/groups.bin", 
Groups guide.
            "Webform": "etc/config-perm/lua/vademecums/webform.bin", 
Web-form guide ( used for POST-requests contents marking).
            "IdentityStatus": "etc/config/lua/vademecums/identity_status.bin", 
Status of Identification element (for example, "Under control", "On trial period", etc.).
            "GroupContacts": "etc/config/lua/vademecums/group_contacts.bin", 
Goups contacts guide.
            "Resources": "etc/config/lua/vademecums/resources.bin"
Web-resources list by categories.
        }, 
 
        "MaxThreads": 8, 
Maximum number of processing streams.
        "UserScript": "etc/scripts/process.lua", 
User lua-script. To be performed after the system one.
        "SystemScript": "etc/scripts/system.lua"
System lua-script.
        "SessionTimeoutInSec": 60,
Session lifecycle in case it was not contacted within the period specified (In seconds). In case the value is "0", the session will not be deleted. Default value is 60.
       "DumpConf": {}
Luaengined dumps filtering configuration section. For details, see Filtering of luaengined dumps
    }, 
 
    "DebugBreak": false, 
If SIGTRAP should be sent (SIGBREAK to Windows) while any exception handling. Used for debugging purposes.
}
 

iw_luaengined.service unit file

Scroll Table Layout
widths50%, 50%

Code
Description

[Unit]

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

Daemon name

After=network-online.service iwtm-consul.service  iw_bookworm.service iw_licensed.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_luaengined

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

ExecStart=/opt/iw/tm5/bin/iw_luaengined -p /opt/iw/tm5/etc

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=32768

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)

 

 
  

[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