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

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

Ключ

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

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

Scroll Table Layout
widths60%,40%

СодержимоеОписание
{
 
    "UseCurlBackend": false, 
Использовать бекэенд curl вместо базы данных.
    "Logging": {...},
см. Общая секция Logging
    "RetryAttemptTimeoutSec": 5, 
Задержка между повторными попытками скачивания конфигурации (в сек)
    "NookDir": "/opt/iw/tm5", 

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

    "PIDFilesPath": "run", 

Не используется

    "NewConfigDirectory": "tmp/config-new", 
Временная директория для скачивания новой конфигурации Traffic Monitor
    "UnsafeSignalHandlers":false
Поддержка работы с необрабатываемыми сигналами. По умолчанию выключена (false). При установке значения true позволяется устанавливать в коде обработчики "небезопасных" сигналов (например, SIGSEVG). Добавлять, включать/выключать данную настройку не рекомендуется без предварительной консультации с разработчиками.
    "AlertTimeout": 5, 
Время ожидания (в сек) оповещения об обновлении конфигурации в СУБД. По истечении данного времени ожидание прерывается на время (в сек), указанное в параметре RetryAttemptTimeoutSec, затем начинается новое ожидание
    "DebugBreak": false, 
Использовать SIGTRAP/SIGBREAK в обработчиках исключений в режиме отладки. Только в отладочных сборках
    "ScriptPath": "bin/notify.py", 
Путь до скрипта, который запускается после скачивания конфигурации
    "Curl": {
Секция настроек curl-бекэнда. НЕ ИСПОЛЬЗУЕТСЯ
        "AlarmHostName": "wss://", 
-
        "CurlOptUserAgent": "curl/7.45.0", 
-
        "CurlMaxThreads": 10, 
-
        "CurlOptMaxRedirs": 50, 
-
        "TokenPath": "/opt/iw/tm5/etc/updater_token.txt", 
-
        "CurlOptRange": "", 
-
        "UpdaterHostName": "https://", 
-
        "CurlOptSslVerifyHost": false, 
-
        "CurlOptSslVerifyPeer": false, 
-
        "AlarmSocketPath": "/api/notify/listen/configUpdate", 
-
        "CurlOptTcpKeepAlive": true
-
    }, 
 
    "CleanupDirectoryOnError": true, 
Очистка директории с новой конфигурацией в случае ошибки
    "CurrentConfigDirectory": "etc/config"
Путь до текущей конфигурации Traffic Monitor
}
 


Unit-файл iw_updater.service 

Scroll Table Layout
widths60%,40%

Код
Описание

[Unit]

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

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

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_updater

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

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

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

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 updater.conf configuration file

Scroll Table Layout
widths65%,35%

ContentDescription
{
 
    "UseCurlBackend": false, 
Using curl backend instead of DB. It is not used in 6.7. x and earlier versions.
    "Logging": {...},
see General section Logging
    "RetryAttemptTimeoutSec": 5, 
Delay between repeated attempts to download configuration (sec).
    "NookDir": "/opt/iw/tm5", 

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

    "PIDFilesPath": "run", 

Not used.

    "NewConfigDirectory": "tmp/config-new", 
Temporary directory to download new Traffic Monitor configuration.
    "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.
    "AlertTimeout": 5, 
Stand-by time (seconds) to notify about DBMS configuration update. On its expiry the expectation is suspended for some time (seconds), specified in RetryAttemptTimeoutSec parameter, than the new expectation is started.
    "DebugBreak": false, 
Using SIGTRAP/SIGBREAK in trap handlers in checkout mode. Only in checkout assemblies.
    "ScriptPath": "bin/notify.py", 
Path to the script, to be run after configuration download.
    "Curl": {
Curl-backend settings section. It is not used
        "AlarmHostName": "wss://", 
-
        "CurlOptUserAgent": "curl/7.45.0", 
-
        "CurlMaxThreads": 10, 
-
        "CurlOptMaxRedirs": 50, 
-
        "TokenPath": "/opt/iw/tm5/etc/updater_token.txt", 
-
        "CurlOptRange": "", 
-
        "UpdaterHostName": "https://", 
-
        "CurlOptSslVerifyHost": false, 
-
        "CurlOptSslVerifyPeer": false, 
-
        "AlarmSocketPath": "/api/notify/listen/configUpdate", 
-
        "CurlOptTcpKeepAlive": true
-
    }, 
 
    "CleanupDirectoryOnError": true, 
New configuration directory cleaning when an error occurs.
    "CurrentConfigDirectory": "etc/config"
Path to Traffic Monitor current configuration.
}
 

 

The iw_updater.service unit file

Scroll Table Layout
widths60%,40%

Code
Description

[Unit]

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

The 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_updater

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

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

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