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

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

Ключ

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

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

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

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

    "DebugBreak": false, 
Посылать ли SIGTRAP (SIGBREAK на Windows) при обработке любого исключения. Служит для отладки
    "DumpDir": "", 
Путь до папки дампов xapi в случае, если не пустой, то в папку /opt/iw/tm5/<значение параметра> будут складываться дампы 
    "DumpFilters": { 
Настраиваемые фильтры для дампов
        "ActionCode": [],
Значение атрибута action.key, который берется из /opt/iw/tm5/etc/config/bookworm/actions.xml, если атрибут action.mnemo равен полю "action" в object.json. 
        "CommonName": [],
Значение поля "common_name" из параметра или файла конфигурации xapi-tool.
        "Headers": {},
Пары значений из секции "headers" из object.json. Они используются без каких-либо преобразований и внутри представляют собой словарь "ключ-значение".
        "License": [],
Значение этого параметра - комбинация полей из object.json, а также параметра common_name.
        "ObjectTypeCode": [],
Значение атрибута object_type.key из /opt/iw/tm5/etc/config/bookworm/services.xml, для объектов, атрибут object_type.mnemo которых равен значению поля "object_type_mnemo" из object.json.
        "ProtocolCode": [],
Значение атрибута protocol.key, который берется из /opt/iw/tm5/etc/config/bookworm/protocols.xml, если атрибут protocol.mnemo равен полю "protocol_mnemo" в object.json.
        "ServiceCode": [],
Значение атрибута service.key из /opt/iw/tm5/etc/config/bookworm/services.xml  того сервиса, для которого определен объект, заданный полем "object_type_mnemo" в object.json.
        "ServiceMnemo": []
Значение атрибута service.mnemo из /opt/iw/tm5/etc/config/bookworm/services.xml того сервиса, для которого определен объект, заданный полем "object_type_mnemo" в object.json.
      },
 
    "Logging": {...},
см. Общая секция Logging
    "MaxInmemTextSizeKB": 10240, 
Размер буфера под данные. При превышении происходит сброс на диск
    "NookDir": "/opt/iw/tm5", 
В секции указывается рабочий каталог модуля. По умолчанию – /opt/iw/tm5.
    "UnsafeSignalHandlers":false
Поддержка работы с необрабатываемыми сигналами. По умолчанию выключена (false). При установке значения true позволяется устанавливать в коде обработчики "небезопасных" сигналов (например, SIGSEVG). Добавлять, включать/выключать данную настройку не рекомендуется без предварительной консультации с разработчиками.
    "TempDir": "tmp", 
Путь до директории с временными файлами iw_xapi
    "ThriftServers": {

Настройки трифт-сервера

        "puppy": {
Секция настроек трифт-сервера "puppy"
            "AuthenticateClient": false, 
Запрашивать ли аутентификацию
            "CertificatePath": "etc/cert/server.pem", 
Путь до сертификата
            "Port": 9101, 
Порт входящих соединений.
            "PrivateKeyPath": "etc/cert/private_key.pem", 
Путь до приватного ключа
            "ServerType": "threaded", 
Тип сервера. По умолчанию – threaded
            "TransportType": "ssl", 
Тип обмена данными. Значение по умолчанию – socket
            "TrustedCertificatesPath": "etc/cert/trusted_certificates"
Путь до хранилища доверенных сертификатов
        }, 
 
        "xapi": {
Секция настроек трифт-сервера "xapi"
            "AuthenticateClient": false, 
Запрашивать ли аутентификацию
            "CertificatePath": "etc/cert/server.pem", 
Путь до сертификата
            "Port": 9100, 
Порт входящих соединений.
            "PrivateKeyPath": "etc/cert/private_key.pem", 
Путь до приватного ключа
            "ServerType": "threaded", 
Тип сервера. По умолчанию – threaded
            "TransportType": "ssl", 
Тип обмена данными. Значение по умолчанию – socket
            "TrustedCertificatesPath": "etc/cert/trusted_certificates"
Путь до хранилища доверенных сертификатов
        }
 
    }, 
 
    "TokensList": "etc/config/access_control/tokens.list", 
Путь до папки с токенами аутентификации трифта
    "ValidatorScriptPath": "etc/xapi-valid.lua"
Путь до валидатора входящего объекта iw_xapi
}
 
Информация
titleПримечание:

Данный конфигурационный файл используется для задания условий фильтрации при создании дампов данных. Подробнее в статье Базы Знаний - "Фильтрация xapi-дампов".

Unit-файл iw_xapi_xapi.service 

Код
Описание

[Unit]

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

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

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_xapi -m xapi

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

ExecStart=/opt/iw/tm5/bin/iw_xapi -p /opt/iw/tm5/etc -m xapi

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

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

LimitMEMLOCK=infinity

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

EnvironmentFile=-/etc/default/iwtm

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

[Install]

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

WantedBy=multi-user.target

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

Unit-файл iw_xapi_puppy.service 

Код
Описание

[Unit]

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

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

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_xapi -m puppy

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

ExecStart=/opt/iw/tm5/bin/iw_xapi -p /opt/iw/tm5/etc -m puppy

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

xapi.conf configuration file

ContentDescription
{
 
    "Bookworm": {...},

see General section Bookworm

    "DebugBreak": false, 
If SIGTRAP should be sent (SIGBREAK to Windows) while any exception handling. Used for debugging purposes.
    "DumpDir": "", 
Path to the folder where xapi dumps are stored. If not empty, the folder /opt/iw/tm5/<parameter's value>  will collect the dumps.
    "DumpFilters": { 
Adjustible filters for dumps.
        "ActionCode": [],
The value of action.key attribute, taken from /opt/iw/tm5/etc/config/bookworm/actions.xml, if the attribute  action.mnemo is equal to the field "action" in  object.json. 
        "CommonName": [],
The value of "common_name" field from xapi-tool configuration file or parameter.
        "Headers": {},
Pairs of values from "headers" section from object.json. They are used without any change and inside they occur to be the "key-meaning" vocabulary.
        "License": [],
The value of this parameter is a mixture of fileds from object.json, and common_name parameter.
        "ObjectTypeCode": [],
The value of  object_type.key attribute from /opt/iw/tm5/etc/config/bookworm/services.xml for the objects, which attribute object_type.mnemo is equal to the value of "object_type_mnemo" field from object.json.
        "ProtocolCode": [],
The value of protocol.key attribute, taken from /opt/iw/tm5/etc/config/bookworm/protocols.xml, if  protocol.mnemo attribute is equal to the field "protocol_mnemo" in object.json.
        "ServiceCode": [],
The value of service.key attribute from /opt/iw/tm5/etc/config/bookworm/services.xml  of the service, with a specific object, assigned by the field "object_type_mnemo" in object.json.
        "ServiceMnemo": []
The value of service.mnemo attribute from /opt/iw/tm5/etc/config/bookworm/services.xml of the service with a specific object, assigned by the field "object_type_mnemo" в object.json.
      },
 
    "Logging": {...},
see General section Logging
    "MaxInmemTextSizeKB": 10240, 
Buffer size to store data. If exceeds, the data to be stored on disk.
    "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.
    "TempDir": "tmp", 
Path to folder with temporary iw_xapi files
    "ThriftServers": {

Thrift server settings

        "puppy": {
Thrift server "puppy" section settings
            "AuthenticateClient": false, 
If authentication should be requested
            "CertificatePath": "etc/cert/server.pem", 
Certificate path
            "Port": 9101, 
Incoming connections path
            "PrivateKeyPath": "etc/cert/private_key.pem", 
Private key path
            "ServerType": "threaded", 
Server type. By default – threaded
            "TransportType": "ssl", 
Data exchange type. value by default – socket
            "TrustedCertificatesPath": "etc/cert/trusted_certificates"
Path to entrusted certificates storage
        }, 
 
        "xapi": {
Thrift server "xapi" settings section
            "AuthenticateClient": false, 
If authentication should be requested
            "CertificatePath": "etc/cert/server.pem", 
Certificate path
            "Port": 9100, 
Incoming connections port
            "PrivateKeyPath": "etc/cert/private_key.pem", 
Private key path
            "ServerType": "threaded", 
Server type. By default – threaded
            "TransportType": "ssl", 
Data exchange type. Default value – socket
            "TrustedCertificatesPath": "etc/cert/trusted_certificates"
Path to entrusted certificates storage
        }
 
    }, 
 
    "TokensList": "etc/config/access_control/tokens.list", 
Path to the folder where authentication thrift tokens are stored
    "ValidatorScriptPath": "etc/xapi-valid.lua"
Path to iw_xapi incoming object validator
}
 
Информация
titleПримечаниеNote:

This configuration file is used to define the filtration conditions when creating the data dumps. The details can be found in the article "Filtering Xapi Dumps".

iw_xapi_xapi.service unit file 

Code
Description

[Unit]

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

The 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_xapi -m xapi

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

ExecStart=/opt/iw/tm5/bin/iw_xapi -p /opt/iw/tm5/etc -m xapi

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

Restriction Limit for the core file dump size (KB)

LimitMEMLOCK=infinity

The maximum size of memory locked address space (KB)

EnvironmentFile=-/etc/default/iwtm

Path to 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

Unit-файл iwiw_xapi_puppy.service  unit file

КодCode
ОписаниеDescription

[Unit]

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

The 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_xapi -m puppy

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

ExecStart=/opt/iw/tm5/bin/iw_xapi -p /opt/iw/tm5/etc -m puppy

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

Restriction Limit for the core file 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