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

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

Ключ

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

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

Scroll Table Layout
widths60%, 40%

СодержимоеОписание
{ 

    "Messed3": {

Объектная модель для iw_capstack типа Messed3 и ее настройки

        "QueuePath": "queue/smtp", 

Путь до выходной очереди. Если указать путь "/dev/null", то обработанный элемент будет удален после обработки

        "Format": true

Использовать ли форматирование xml-файлов очереди

  },  

    "Statistics": {...}

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

  

    "Logging": {...}

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

    "processors": {

Процессоры протоколов (задействованные процессоры описаны в секции UsedProcessors)

        "pop3": {

Pop3

            "OperatingPorts": [

Порты

                110

 

            ]

 

        }, 

 

        "imap4": {

Imap4

            "OperatingPorts": [

Порты

                143, 

 

                993

 

            ]

 

        }, 

 

        "nrpc": {

NRPC

            "TrackExternal": true, 

Разбирать ли исходящие/входящие из/в IBM Lotus Domino сообщения

            "OperatingPorts": [

Порты

                1352

 

            ], 

 

            "TrackInternal": true

Разбирать ли сообщения между внутренним адресатами IBM Lotus Domino

        }

 

    }, 

 

    "NookDir": "/opt/iw/tm5", 

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

"UnsafeSignalHandlers":false?

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

    "UsedProcessors": {

В секции задаются протоколы, которые будет разбирать iw_capstack. Процесс разбирает протокол и преобразовывает его в расширение. Далее трафик передается процессу iw_messed
(список допустимых процессоров протоколов – см. секцию processors) 

        "pop3": true, 

Разбор pop3. Значение по умолчанию: true

        "imap4": true, 

Разбор imap4. Значение по умолчанию: true

        "nrpc": false

Разбор nrpc. Значение по умолчанию: false

    }, 

 

    "UsedSources": {

В секции задаются используемые источники данных для iw_capstack.
Поддерживается только iscp, но при необходимости для отладки можно подключить pcap.

        "iscp": true

На данный момент поддерживается только iscp

    }, 

 

    "MemoryLimits": {

Настройки выделения памяти iw_capstack, в байтах
(0 - без ограничений. RejectSessionsLimit < DropSessionsLimit < StopAllocationLimit для ненулевых значений)

        "RejectSessionsLimit": 4294967296, 

При превышении порога не создаются новые сессии

        "StopAllocationLimit": 0, 

При превышении порога останавливается выделение памяти

        "DropSessionsLimit": 0

Порог срабатывания, после которого включается механизм уничтожения сессий (начиная с самой объемной)

    }, 

 

    "Sources": {

В секции задаются списки источников данных для iw_capstack.

        "iscp": {

Infowatch Sniffer Connection Protocol (проприетарный протокол)

            "ListenArea": "capstack", 

Область прослушки, используемая в iw_sniffer.
Если область прослушки с определенным именем не настроена в iw_sniffer, но есть в iw_capstack или iw_proxy, то при подключении в логах будет ошибка, что данной области не существует, и перехват невозможен. 

            "BaudRate": "max", 

Ограничение по скорости передачи данных для iscp, "max" - не использовать ограничение (в битах/сек (baud)).

            "Niceness": -8, 

Значение приоритета (nice) для потоков-обработчиков iscp-протокола

            "Host": "127.0.0.1", 

IP-адрес iw_sniffer для подключения

            "Port": 4301

Порт iw_sniffer для подключения

        }, 

 

        "script": {

Источник, используемый для отладки. НЕ ИСПОЛЬЗУЕТСЯ.
Для получения скрипта необходимо изменить настройку в UsedProcessors: "sessiondump": true. По умолчанию скрипты записываются в директорию cs-dump. 

            "InputDir": "scripts"

 

        }, 

 

        "smtp": {

НЕ ИСПОЛЬЗУЕТСЯ

            "Host": "127.0.0.1", 

 

            "Port": 2525

 

        }, 

 

        "icap": {

НЕ ИСПОЛЬЗУЕТСЯ

            "Host": "127.0.0.1", 

 

            "Port": 1344

 

        }, 

 

        "devmon": {

НЕ ИСПОЛЬЗУЕТСЯ

            "Host": "127.0.0.1", 

 

            "Port": 6559

 

        }, 

 

        "pcap": {

НЕ ИСПОЛЬЗУЕТСЯ
Может использоваться в отладочных целях. Данная обработка отличается от снифферовской, так что использовать стоит только для полностью корректных дампов без нарушений порядка/пропусков/дублей пакетов. 

            "Filter": "1:65535", 

-

            "Speed": "fast", 

-

            "DefragTimeoutInSec": 60, 

-

            "InputFile": "input.pcap"

-

        }

 

    }, 

 

    "DebugBreak": false, 

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

    "HeartbeatTimeInMs": 257, 

Интервал вызова внутренних асинхронных процедур

"Sheme_liro": "bin/typedef-main.lso",

Путь к файлу со схемой Liro

    "UsedObjectModels": {

Используемая объектная модель (может быть использована только одна модель).

        "Messed3": true, 

Использовать модель Messed3

    }, 

 

}

 


Unit-файл iw_capstack.service 

Scroll Table Layout
widths50%, 50%

Код
Описание

[Unit]

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

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

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

Type=simple

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

PermissionsStartOnly=true

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

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

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

ExecStart=/opt/iw/tm5/bin/iw_capstack -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

Максимальное заблокированное в памяти адресное пространство (КБ)
AmbientCapabilities=CAP_SYS_NICEПривилегия, разрешающая поднятие приоритета процессов и потоков

 

 
  

[Install]

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

WantedBy=multi-user.target

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

The capstack.conf configuration file:

Scroll Table Layout
widths60%,40%

ContentDescription
{
 
    "Messed3": {
Object model for iw_capstack type Messed3 and its settings
        "QueuePath": "queue/smtp", 
Path to output queue. If "/dev/null" path is specified, then an element will be removed after processing
        "Format": true
If formatting of XML file queue should be enabled
 }, 
 
    "Statistics": {...}
See General section Statistics
    "Logging": {...}
See General section Logging
    "processors": {
Protocols processors (used processors are described in section UsedProcessors)
       "pop3": {
Pop3
            "OperatingPorts": [
Ports
                110
 
            ]
 
        }, 
 
       "imap4": {
Imap4
            "OperatingPorts": [
Ports
                143, 
 
                993
 
            ]
 
        }, 
 
       "nrpc": {
NRPC
            "TrackExternal": true, 

If incoming/outgoing messages from/to IBM Lotus Domino should be parsed

            "OperatingPorts": [
Ports
                1352
 
            ], 
 
            "TrackInternal": true

If messages between internal addressees of IBM Lotus Domino should be parsed

        }
 
    }, 
 
    "NookDir": "/opt/iw/tm5", 
In this section, the working directory of the module 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.
    "UsedProcessors": {
This section contains protocols that should be parsed by iw_capstack . The process parses the protocol and transforms it into the extension. Then, traffic is sent to  iw_messed
(see section processors for the valid protocol processors list). 
        "pop3": true, 

Pop3 parsing. Default value: true  

        "imap4": true, 
Imap4 parsing.  Default value: true  
        "nrpc": false
Nrpc parsing. Default value: false  
    }, 
 
    "UsedSources": {
Used data sources for iw_capstack are specified in the section. Iscp is the only supported element, but pcap could be used for debugging purposes if required.
        "iscp": true
At this time, iscp is only supported
    }, 
 
    "MemoryLimits": {
Memory limits for iw_capstack (bytes). 
(0 - without restrictions. RejectSessionsLimit < DropSessionsLimit < StopAllocationLimit for not null values)
        "RejectSessionsLimit": 4294967296, 
Upon achieving the limit, new sessions could not be created
        "StopAllocationLimit": 0, 
Upon achieving the limit, memory allocation is no longer possible
         "DropSessionsLimit": 0
Operation threshold, upon crossing which the session dropping mechanism is activated (starting with the most memory consuming).
    }, 
 
    "Sources": {
Data source lists for iw_capstack are specified here
        "iscp": {
InfoWatch Sniffer Connection Protocol (proprietary protocol)
           "ListenArea": "capstack", 
Listen area, used in  iw_sniffer . 
If a listen area with the specified name is not configured in
iw_sniffer , but it exists in iw_capstack  or iw_proxy , the error "This area does not exist and interruption is not possible" will be written in the logs upon connection.
            "BaudRate": "max", 
Baud rate limit for iscp, "max" - do not set a limit (baud)
             "Niceness": -8, 
Priority value (nice) for threads-handlers of iscp
            "Host": "127.0.0.1", 
iw_sniffer IP address 
            "Port": 4301
 iw_sniffer port
        }, 
 
        "script": {
Source used for debugging. NOT USED.
To get the script, make  "sessiondump": true in
UsedProcessors . Scripts are written in the  cs-dump directory by default. 
            "InputDir": "scripts"
 
        }, 
 
        "smtp": {
NOT USED
            "Host": "127.0.0.1", 
 
            "Port": 2525
 
        }, 
 
        "icap": {
NOT USED
            "Host": "127.0.0.1", 
 
            "Port": 1344
 
        }, 
 
        "devmon": {
NOT USED
            "Host": "127.0.0.1", 
 
            "Port": 6559
 
        }, 
 
        "pcap": {

NOT USED. Could be used for debugging purposes. This processing differs from the sniffer processing. Therefore, it could be used only for totally correct dumps without violation of order/skips/double packages.

            "Filter": "1:65535", 
-
            "Speed": "fast", 
-
            "DefragTimeoutInSec": 60, 
-
            "InputFile": "input.pcap"
-
        }
 
    }, 
 
    "DebugBreak": false, 
To send or not to send SIGTRAP (SIGBREAK to Windows) while any exception handling. Used for debugging purposes.
    "HeartbeatTimeInMs": 257, 
Asynchronous internal procedures call interval
    "Sheme_liro": "bin/typedef-main.lso",
Path to file with Liro scheme
    "UsedObjectModels": {
Used object model (the only one model could be used)
        "Messed3": true, 
Use the Messed3 model
    }, 
 
}
 

The iw_capstack.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 Capture Stack

The daemon name

After=network-online.service iwtm-consul.service Daemons 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_capstack

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

ExecStart=/opt/iw/tm5/bin/iw_capstack -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)
AmbientCapabilities=CAP_SYS_NICEA privilege that enables raising the priority for processes and streams
  
  

[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